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: 

Export Each Solid as a Step/STL file

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
HSI-Autodesk
578 Views, 6 Replies

Export Each Solid as a Step/STL file

Is there a way to export each solid individually from a ipt file besides making components out of them into a assembly file and exporting them from there?

 

Can we do this with iLogic?

 

I could make model states of each solid, but some of the solids are dependent on the others, and I will have to change up the drawings to get rid of errors.

6 REPLIES 6
Message 2 of 7
A.Acheson
in reply to: HSI-Autodesk

Hi @HSI-Autodesk 

No it is not possible to do so directly. You can use this code here to save each solid  body as a part document. Then use this vba sample here to export part document to step. You will prob find a vb.net or ilogic version in an online search.

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 7
HSI-Autodesk
in reply to: HSI-Autodesk

@A.Acheson Okay, thank you for the information. 

Message 4 of 7
D.Motshagen
in reply to: HSI-Autodesk

Hi
I Think it should be possible:

If you can manage the view representations per body.

This is how I manage it by hand, I will make the bodies invisible and when exporting to .STL Only the visibles are present in the file.

Message 5 of 7
HSI-Autodesk
in reply to: D.Motshagen

Thank you. I'll look into that when I next need this again. 

Message 6 of 7
WCrihfield
in reply to: HSI-Autodesk

Just as added information, for future folks who find this topic.  We can actually export individual SurfaceBody objects (a SurfaceBody object can be either just a surface or a solid).  We are just very limited on the file formats we can export them as...directly.  We can use the SurfaceBody.DataIO property to access a DataIO object, that we can then use further towards the export process.  Then we can use the DataIO.WriteDataToFile method to export the body out as various variations of "ACIS SAT ..." or "ACIS SAB ..." file types.  I am not familiar with those file types, so I never used this process myself.  There seems to be about 10 variations of that 'format' that can be specified when exporting like this.  We can get this information ourselves by using the DataIO.GetOutputFormats method (which is how I originally got it).  Then within its 'storage types', all variations could be stored to file, but one variation could be stored to a file or 'Stream'.

Unfortunately, there was no option for exporting directly to STEP or STL file type.

 

Edit:  I just did a little searching, and found the following:

I believe the actual file extensions would be ".sat" & .sab".

Links:

https://www.spatial.com/products/3d-acis-modeling 

https://en.wikipedia.org/wiki/ACIS 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 7 of 7
WCrihfield
in reply to: WCrihfield

Just dropping a link here to another forum post where this topic came up again, and some potentially valuable information is included for further research & development.

https://forums.autodesk.com/t5/inventor-programming-ilogic/mutibody/m-p/12826105/highlight/true#M168... 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

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

Post to forums  

Autodesk Design & Make Report