*.ipt to DXF using iLogic polyline

*.ipt to DXF using iLogic polyline

Anonymous
Not applicable
336 Views
1 Reply
Message 1 of 2

*.ipt to DXF using iLogic polyline

Anonymous
Not applicable

I have an iLogic code that I run in an ipt that creates a dxf and saves it in a specified folder by a specified name. The only thing I am not able to do is convert all lines to polylines. Any help would be greatly appreciated. Code below:

 

sOut = "FLAT PATTERN DXF?AcadVersion=R12&OuterProfileLayer=0&InteriorProfilesLayer=5&InvisibleLayers=IV_UNCONSUMEND_SKETCHES;IV_ALTREP_BACK;IV_ALTREP_FRONT;IV_ARC_CENTERS;IV_TOOL_CENTER_DOWN;IV_TOOL_CENTER;IV_ARC_CENTERS;IV_TANGENT;IV_BEND;IV_BEND_DOWN;IV_FEATURE_PROFILES&SplineTolerance Double 0.001"

 

0 Likes
337 Views
1 Reply
Reply (1)
Message 2 of 2

JamieVJohnson2
Collaborator
Collaborator

Pline definitions are way different than line definitions, in that they have a single list of vertex points that define the order of the line.  Attempting to join lines without knowing the order is tricky, but you can write code that can 'connect the dots' then create a polyline from the list.  The native ACAD.EXE command "JOIN" does exactly that.

 

I think you will need to get into the AutoCAD API to convert the exported lines and arcs into polylines (dwg or dxf).  You can either run the entire code inside of AutoCAD using the Managed .Net code API or inside of your Inventor environment using the Autodesk.AutoCAD.Interop API (which has some similarities, and more limitations).  If you create a "Join" command script or macro, you can call it from the interop ACADApp class.  

 

I do most all my ACAD programming using the .Net API while running the ACAD.exe engine, so I won't be much help with the Interop API that comes with Inventor.  If you have AutoCAD at your disposal then the code options are very many (some easy, some not).

 

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes