documentation bug: Document and Assembly Structure

documentation bug: Document and Assembly Structure

Anonymous
Not applicable
1,137 Views
3 Replies
Message 1 of 4

documentation bug: Document and Assembly Structure

Anonymous
Not applicable

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)

 

Accepted solutions (1)
1,138 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor
Accepted solution

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
0 Likes
Message 3 of 4

Anonymous
Not applicable
0 Likes
Message 4 of 4

BrianEkins
Mentor
Mentor

Thanks for the reminder.

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