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: 

Fusion 360 API equivalent for "Get Latest Version"

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
tomveuskens
175 Views, 3 Replies

Fusion 360 API equivalent for "Get Latest Version"

Hello everyone

 

Does anyone know if there is an equivalent in the API to refresh a design once it has been updated by a different Fusion instance? Similar to clicking the "Get Latest Version" button?

tomveuskens_0-1676476472679.png

 

Thank you!

 

 

3 REPLIES 3
Message 2 of 4
kandennti
in reply to: tomveuskens

Message 3 of 4
tomveuskens
in reply to: kandennti

Dear @kandennti 

 

Thank you for getting back to me.

 

The Document.updateAllReferences method consistently triggers 

RuntimeError: 3: update all references not allowed on this document

for me.

 

The text command you referred to, however, works perfectly.

 

Thank you very much.

 

All the best

Tom

Message 4 of 4
en9y37
in reply to: tomveuskens

Hi @tomveuskens 

 

That happened to me too. The point is that if the document doesn't need an update, you will get that error. So, to avoid it, you only have to add this condition:

 

    design = adsk.fusion.Design.cast(app.activeProduct)
    if not design.parentDocument.isUpToDate:
        design.parentDocument.updateAllReferences()

 

I hope it helps

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