Design-Surface-Create drop down menu

Design-Surface-Create drop down menu

dozerdroid
Enthusiast Enthusiast
387 Views
2 Replies
Message 1 of 3

Design-Surface-Create drop down menu

dozerdroid
Enthusiast
Enthusiast

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)

0 Likes
Accepted solutions (1)
388 Views
2 Replies
Replies (2)
Message 2 of 3

nnikbin
Collaborator
Collaborator
Accepted solution

The short answer is: SurfaceCreatePanel

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

0 Likes
Message 3 of 3

dozerdroid
Enthusiast
Enthusiast

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

0 Likes