Export Each Solid as a Step/STL file

Export Each Solid as a Step/STL file

HSI-Autodesk
Participant Participant
1,628 Views
6 Replies
Message 1 of 7

Export Each Solid as a Step/STL file

HSI-Autodesk
Participant
Participant

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.

0 Likes
Accepted solutions (1)
1,629 Views
6 Replies
Replies (6)
Message 2 of 7

A.Acheson
Mentor
Mentor
Accepted solution

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
0 Likes
Message 3 of 7

HSI-Autodesk
Participant
Participant

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

0 Likes
Message 4 of 7

D.Motshagen
Contributor
Contributor

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.

0 Likes
Message 5 of 7

HSI-Autodesk
Participant
Participant

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

0 Likes
Message 6 of 7

WCrihfield
Mentor
Mentor

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)

0 Likes
Message 7 of 7

WCrihfield
Mentor
Mentor

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)

0 Likes