Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Name of the current configuration?

thomasa88
Advocate

Name of the current configuration?

thomasa88
Advocate
Advocate

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.

0 Likes
Reply
Accepted solutions (1)
293 Views
2 Replies
Replies (2)

kandennti
Mentor
Mentor
Accepted solution

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()))
0 Likes

thomasa88
Advocate
Advocate

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

 

I will try this out 🙂

1 Like