Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can i create a center point by vba

1 REPLY 1
Reply
Message 1 of 2
hn4096
1301 Views, 1 Reply

How can i create a center point by vba

Dear all:

        

            i want to create a center point  use vba code,but i have no idea to do

 

           i need this url center point,pls help

 

http://wikihelp.autodesk.com/Inventor/enu/2012/Help/0073-Autodesk73/0308-Parts308/0309-2D_sketc309/0...

1 REPLY 1
Message 2 of 2
Yijiang.Cai
in reply to: hn4096

Hello,

 

please create one sketch first, and copy & paste the code lines in VBA editor. The centerpoint will be created after running.

 

Thanks,

River Cai

 

=====================================================

Sub CenterPointCreate()
    Dim oSketch As Sketch
    Set oSketch = ThisApplication.ActiveEditObject
   
    Dim oPt As Point2d
    Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(1, 1)
   
    Call oSketch.SketchPoints.Add(oPt, True)
End Sub

Thanks,
River Cai

Inventor Quality Assurance Team
Autodesk, Inc.
Email: River-Yijiang.Cai@autodesk.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report