Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
I have multi-body part files and I'd like to export each solid body into separate STL files via the API.
The workflow I have currently is to make components and create individual IPTs for each body, followed by running the following script to export them to STL.
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument
For Each oOccurrence As ComponentOccurrence In oDoc.ComponentDefinition.Occurrences
Dim oCompDoc As PartDocument = oOccurrence.Definition.Document
Dim stlName As String= System.IO.Path.GetFileNameWithoutExtension(oCompDoc.FullFileName)+".stl"
Dim savePath As String = System.IO.Path.GetDirectoryName(oCompDoc.FullFileName)
Logger.Trace(savePath & "\" & stlName)
oCompDoc.SaveAs(savePath & "\" & stlName,True)
Next
MessageBox.Show("Done","ExportAllPartsAsSTL")
I'm wondering if there is a way to export the solid bodies directly via the API without having to go through the Make Component step?
Or if there is a way to access the 3D Print Environment via the API? Because in this environment, user can suppress individual bodies and export the remaining bodies as STL.
Regards
Ilyas
Solved! Go to Solution.