Announcements
Visit Fusion 360 Feedback Hub, the great way to connect to our Product, UX, and Research teams. See you there!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API: Export Single bRepBody as STEP/IGS/etc.

API: Export Single bRepBody as STEP/IGS/etc.

Right now through the API (I'm working with Python specifically) there is the ability to export a single bRepBody as an STL. I'd like the ability to export as a STEP/IGES/etc.

 

Currently the ability to export single components as STEP files is nice, but in the case where a single compononent has multiple Bodies associcated, I'd like individual files for those bodies.

 

4 Comments
charegb
Community Manager
Status changed to: Gathering Support
 
TimeraAutodesk
Community Manager
Status changed to: RUG-jp審査通過

Thank you for idea - this is getting archived due to lack of votes. Ideas with 10+ votes within a month are reviewed by the Product Management team for future consideration. If you feel strongly that this is needed, please resubmit with more detail on why you think this is valuable to Fusion 360 users so that the idea gathers some more support from the community. 

 

charegb
Community Manager
Status changed to: オートデスク審査落選

Opps, we marked it archived accidentally. This is a good idea for an API. I'll add it to the backlog.

Bankim

ekinsb
Alumni

Here's a workaround using the current API to do what you want.

 

def exportBody():
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        des = app.activeProduct
        
        # Have the body selected.        
        body = ui.selectEntity('Select the body', 'SolidBodies').entity

        # Create a new component using this body.
        newBody = body.createComponent()
        newComp = newBody.parentComponent
        newOcc = des.rootComponent.allOccurrencesByComponent(newComp).item(0)
                
        # Export the component as STEP.
        exportMgr = des.exportManager
        stepOptions = exportMgr.createSTEPExportOptions('C:/Temp/SingleBody.step')
        stepOptions.geometry = newOcc
        exportMgr.execute(stepOptions)
        
        # Do an undo to get rid of the create component operation.
        undoCmd = ui.commandDefinitions.itemById('UndoCommand')
        undoCmd.execute()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

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

Submit Idea  

Autodesk Design & Make Report