MyDocumentOpenedHandler - Problem

MyDocumentOpenedHandler - Problem

isocam
Collaborator Collaborator
349 Views
1 Reply
Message 1 of 2

MyDocumentOpenedHandler - Problem

isocam
Collaborator
Collaborator

Can anybody help?

 

Please see the attached script.

 

I am using "MyDocumentOpenedHandler" to check if a PDF copy of a drawing exists when I open a drawing.

 

If I put a ui.messageBox into the script the PDF file is successfully created!

 

If I remove the ui.messageBox Fusion 360 "hangs up" and I have to close Fusion 360.

 

Does anybody know what I am doing wrong, or how to correct this, or is this a possible bug???

 

Many thanks in advance!

 

Darren

0 Likes
350 Views
1 Reply
Reply (1)
Message 2 of 2

kandennti
Mentor
Mentor

Hi @isocam.

 

I don't understand the question, but I will describe what I know about the documentOpened event.

 

It seems that the documentOpened event is fired when the command is finished, not when the document is completely opened.

 

You can see a sample of how I picked up the timing of the document opening from the task in the past.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/drawing-pdf-export-how-to-access-the-new-e... 

 

0 Likes