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: 

Design-Surface-Create drop down menu

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
dozerdroid
131 Views, 2 Replies

Design-Surface-Create drop down menu

Hi, I am moving my scripts to plug in's and the snippet below works fine with the new command added to the Design-Solid-Create  but I really want it in the Design-Surface-Create but am having a little confusion with this change. Is the correct parameter to alter the highlighted SolidCreatePanel or am I missing the boat and something else is required ?  Thanks for your assistance and if you could point me to the correct file where I should have found this that would be helpful so I don't have to post in the future.  Dozer

 

def run(context):
try:
global _app, _ui

_app = adsk.core.Application.get()
_ui = _app.userInterface
cmdDef = _ui.commandDefinitions.addButtonDefinition('adskSeaWolfHullDesignerPythonAddIn', 'SeaWolf Hull Designer', 'Creates a hull component', 'Resources/SeaWolf Hull Designer')
createPanel = _ui.allToolbarPanels.itemById('SolidCreatePanel')
hullButton = createPanel.controls.addCommand(cmdDef)
onCommandCreated = HullCommandCreatedHandler()
cmdDef.commandCreated.add(onCommandCreated)
_handlers.append(onCommandCreated)

2 REPLIES 2
Message 2 of 3
nnikbin
in reply to: dozerdroid

The short answer is: SurfaceCreatePanel

You can use Write user interface to a file API Sample to find the information you need about panelIds

Message 3 of 3
dozerdroid
in reply to: dozerdroid

Thanks for the response, I'll check out the sample.

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