Making sketch in the view of the Inventor drawing by using VB.net

Making sketch in the view of the Inventor drawing by using VB.net

thanh.trantuan
Contributor Contributor
713 Views
4 Replies
Message 1 of 5

Making sketch in the view of the Inventor drawing by using VB.net

thanh.trantuan
Contributor
Contributor

Hi everyone, 

 

I want to make a sketch line in the view of the Inventor drawing, the position of the sketch line is determined from the part edge of the view.

1.PNG

for example: I drawing a sketch line, and the distance btw this line and the part edges are 150 mm, 200mm, 200 mm as mentioned above. The most important thing is when the part's edge is changed, the sketch will changed accordingly. I will make 5 sketch lines to show the section of the 5 vertical beams.

 

Could anyone suggest me the code to do this task?

Many thanks

0 Likes
Accepted solutions (1)
714 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Does the code need to do everything automatically, with no manual interaction from the user, upon running the code, or would it be acceptable to, ask the user to select View and / or Line in view, while code is running?

Can you attach non-confidential model & drawing files for us to experiment with?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

thanh.trantuan
Contributor
Contributor

Hi WCrihfield,

I come up with an idea that after the model was based then run the code, these section will be automatically created. I attached the model here, as you can see, in the model, the parts called web were created by Work_Plane. I intend to use the position of work_plane in the model to determine the position of sketch in the view of the drawing, but I cannot find the way to do.

 

Another way can be accepted is we can choose the edge of the parts where the section is created, then constraint this sketch as the picture show

 

Please help me to deal with this, many thanks

0 Likes
Message 4 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@thanh.trantuan,

 

Hoping that reply in below forum link may be answered.

 

https://forums.autodesk.com/t5/inventor-customization/add-in-to-create-section-automatically/m-p/934...

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 5 of 5

thanh.trantuan
Contributor
Contributor

@chandra.shekar.g 

Many thanks, there are still some questions that need to be supported

0 Likes