Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

extend multiple sketch lines with API

3 REPLIES 3
Reply
Message 1 of 4
elmar.stoeger
476 Views, 3 Replies

extend multiple sketch lines with API

Hi,

 

I just started to get into Inventor API (I am using Inventor 2015).

The goal is to do some basic ray tracing in a 2D sketch (for the beginning ;-)).

 

API seams to be perfect for doing so (creating several sketchlines and manipulating them...).

So far I managed to create a specific amount of lines (and just for practicing changing their colors).

The problem now is to (automatically) extend these lines to already existing line and arc elements in the sketch.

 

I've gone through the API help, but didn't find a way to do it automatically (manually is no problem).

 

I would appreciate any kind of info šŸ™‚

 

thanks and best regards

Elmar

3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: elmar.stoeger

Unfortunately the area of sketch editing is an area where the API is lacking.  The ability to extend and trim sketch entities is not currently supported by the API.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4
elmar.stoeger
in reply to: ekinsb

Hi Brian,

 

thanks for the fast reply.

 

I will try the "IntersectWithCurve" command. It should make me able to move the EndSketchPoint to that specific coordinate right?

 

thanks and best regards

Elmar

 

 

Message 4 of 4

Hi Elmar,

 

yes, this is the correct direction. I wrote a blog on such topic a few months ago for Chinese  customers, but I think it is not difficult for you to understand the demo code. The code covers 3 scenarios only: Line to Line, Line to Arc and Line to Spline. you will need to investigate the behaviors of Extend in UI, and design the code for more scenarios.

 

 http://blog.csdn.net/autodeskinventorapi/article/details/17680531

 

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

Post to forums  

Autodesk Design & Make Report