Hi @isocam .
This will bring up the RootComponent properties dialog.
import adsk.core, adsk.fusion, traceback
def run(context):
ui = adsk.core.UserInterface.cast(None)
try:
app :adsk.fusion.Application = adsk.core.Application.get()
ui = app.userInterface
des :adsk.fusion.Design = app.activeProduct
root :adsk.fusion.Component = des.rootComponent
sels: adsk.core.Selections = ui.activeSelections
sels.clear()
sels.add(root)
app.executeTextCommand(u'Commands.Start FusionPropertiesCommand')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
However, it is not stable when tried here.
We will also show the edit dialog for the first extrusion of the RootComponent.
import adsk.core, adsk.fusion, traceback
def run(context):
ui = adsk.core.UserInterface.cast(None)
try:
app :adsk.fusion.Application = adsk.core.Application.get()
ui = app.userInterface
des :adsk.fusion.Design = app.activeProduct
root :adsk.fusion.Component = des.rootComponent
for feat in root.features:
feat.objectType
extrudeFeat = getExtrudeFeature(root)
if not extrudeFeat:
return
sels: adsk.core.Selections = ui.activeSelections
sels.clear()
sels.add(extrudeFeat)
app.executeTextCommand(u'Commands.Start FusionExtrudeEditCommand')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def getExtrudeFeature(comp) -> adsk.fusion.ExtrudeFeature:
extrudeFeat = None
for feat in comp.features:
if feat.objectType == 'adsk::fusion::ExtrudeFeature':
extrudeFeat = feat
break
return extrudeFeat