Migrating adding from Design workspace to manufacture model

Migrating adding from Design workspace to manufacture model

rbackman07
Enthusiast Enthusiast
488 Views
2 Replies
Message 1 of 3

Migrating adding from Design workspace to manufacture model

rbackman07
Enthusiast
Enthusiast

Hi there, I have a script that is running in the design workspace but now that fusion has nesting in manufacture model I want to move it there. but the addin is not showing up there by default. Can anyone give me a hint as to what needs to change to make this work? 

 

For example to toolbar/panel I was using before is SolidCreatePanel

 

ui.allToolbarPanels.itemById('SolidCreatePanel')

 

also assuming it has a differnt timeline?

 

 

app = adsk.core.Application.get()
design = app.activeProduct
timeLine = design.timeline

 

is the rootcomponent the same?

 

design.rootComponent

 

Any other gotchas for working with manufacture models?

 

I am super excited about the arrange feature! any help is greatly appreciated.

489 Views
2 Replies
Replies (2)
Message 2 of 3

KrisKaplan
Autodesk
Autodesk

The Manufacture workspace is related to the CAM API. These are types defined in the adsk.cam namespace.

 

The active product in this case is adsk.cam.CAM (instead of adsk.fusion.Design when you are in the Design workspace).

 

More complete documentation is a work in progress. But I would suggest poking around on the Python command line in Fusion.  For example, you can use the following to get a list of panels in the current workspace.

 

app = adsk.core.Application.get()
ui = app.userInterface
[p.name for p in ui.activeWorkspace.toolbarPanels]

 

Or to get a list of members with documentation on an object (or function) you can use the 'help' command.

 

help(app.activeProduct)

 

Or to just get a smaller list of member names available:

 

dir(app.activeProduct)

 

Kris



Kris Kaplan
Message 3 of 3

rbackman07
Enthusiast
Enthusiast

Thanks Kris!

0 Likes