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: 

documentation bug: Document and Assembly Structure

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
s
Observer
764 Views, 3 Replies

documentation bug: Document and Assembly Structure

The first python example on this page does not work (any more?):

app = adsk.core.Application.get()
ui = app.userInterface

design = adsk.fusion.Design(app.activeProduct) ### <<--- no constructor defined
if not design:
    ui.messageBox('No active Fusion 360 design', 'No Design')
    return

The line in the middle should probably be

design = adsk.fusion.Design.cast(app.activeProduct)

 

3 REPLIES 3
Message 2 of 4
BrianEkins
in reply to: s

It's a mistake in the documentation. I'm fairly certain that I wrote that block of code in a text editor, along with the rest of that article, and not in an IDE. So it's my mistake and it should be using the cast property as you guessed.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 4

Message 4 of 4

Thanks for the reminder.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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