Hello,
here is a Python script that you can easily translate in C++:
#Author-Jerome Briot
#Description-
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
for i in range(ui.allToolbarPanels.count):
if ui.allToolbarPanels.item(i).isVisible == True:
print(ui.allToolbarPanels.item(i).id)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
It returns (for example):
CAMJobPanel
CAM2DPanel
CAM3DPanel
CAMDrillingPanel
CAMMultiAxisPanel
CAMTurningPanel
CAMWLPCPanel
CAMActionPanel
CAMInspectPanel
CAMManagePanel
VisualizationPanel
CAMScriptsAddinsPanel
SelectPanel
3DStoryboardPanel
3DComponentPanel
AnnotationPanel
PublisherViewPanel
PublishVideoPanel
DebugDialog
ForDeletionPanel
SketchPanel
SolidCreatePanel
SolidModifyPanel
AssembleJointsPanel
ConstructionPanel
InspectPanel
InsertPanel
SolidMakePanel
SolidScriptsAddinsPanel
SelectPanel
FusionDocumentationEnvironment
ViewsPanel
ModifyPanel
GeometryPanel
DimensionsPanel
TextPanel
SymbolsPanel
BillOfMaterialsPanel
OutputPanel
StudyPanel
MaterialsPanel
ConstraintsPanel
LoadsPanel
ContactsPanel
ViewsPanel
SolvePanel
ManagePanel
ResultsPanel
InspectPanel
SynchronizePanel
ResultsAnimatePanel
ResultsOptionsPanel
PostMeshPanel
CompareLayoutsPanel
SelectPanel
DebugPanel
Note that a more Pythonic version would be:
#Author-Jerome Briot
#Description-
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
for TbP in ui.allToolbarPanels:
if TbP.isVisible == True:
print("{}".format(TbP.id))
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))