Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Name of the current configuration?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
thomasa88
128 Views, 2 Replies

Name of the current configuration?

Hi, is there a way to read the name of the currently active configuration in a document?

 

Browsing the documentation, I can't find a function for it.

2 REPLIES 2
Message 2 of 3
kandennti
in reply to: thomasa88

Hi @thomasa88 -San.

 

I searched for it and was able to get it this way.

# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.fusion as fusion

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface
        des: fusion.Design = app.activeProduct

        if not des.isConfiguredDesign: return

        configTopTable: fusion.ConfigurationTopTable = des.configurationTopTable
        actRow: fusion.ConfigurationRow = configTopTable.activeRow
        ui.messageBox(actRow.name, "Active Configuration Name")

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Message 3 of 3
thomasa88
in reply to: thomasa88

Thank you, @kandennti ! You are a scripting expert!

 

I will try this out 🙂

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report