Check if inventor has finished exporting

Check if inventor has finished exporting

matt_jlt
Collaborator Collaborator
528 Views
5 Replies
Message 1 of 6

Check if inventor has finished exporting

matt_jlt
Collaborator
Collaborator

I am currently doing a batch export process and would like to know if it is possible to tell if inventor has finished processing an export when using the built in translators for PDF / DXF?

 

I have code that runs after it and it seem like sometimes the export is still running while it is doing another task which i do not want. Also, i don't think the Thisapplication.Ready flag works for this? Unless i am wrong and have been looking at this code for too long losing my mind 😋

 

 

0 Likes
Accepted solutions (2)
529 Views
5 Replies
Replies (5)
Message 2 of 6

FINET_Laurent
Advisor
Advisor
Accepted solution

Hi,

 

Not sure about this... I think Inventor has to finish the current action to execute the next unless told so.

What I'm doing for long tasllike this is creating an addin and executing the long task with a background worker and add a progress bar.

 

laurentfinetAF8M9_0-1624859976456.png

 

Regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 6

matt_jlt
Collaborator
Collaborator

I haven't really used background workers with inventor addins before. Any chance you could share a sample on how it integrates?

 

Thanks, Matt.

0 Likes
Message 4 of 6

FINET_Laurent
Advisor
Advisor

Hi,

 

I used this documentation :

 

https://stackoverflow.com/questions/40554945/vb-net-creating-ui-in-a-backgroundworker

 

Regards,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

Message 5 of 6

CattabianiI
Collaborator
Collaborator
Accepted solution

As far as I know and use, the translators are synchronous, and so you know the export has finished when the execution moves from SaveCopyAs instruction to the subsequent one.

 

How did you notice that the code after the export is executed before export completion? Did you work with exported file?
Is the 2D PDF right? because the 3D is not a translator, it's an addin and therefore could have a different behaviour.


I suggest to check these things if you noticed something weird: 
- Try to unload unnecessary addins especially third party ones, maybe rewriting the export in an external iLogic rule to unload your addin too.

- Check if there's some iLogic code which triggers while or after your export

- Is the antivirus locking your exported file?


Message 6 of 6

matt_jlt
Collaborator
Collaborator

Thanks CattabianiI, You might be right, i think it may have been a result of more than one thing running at the same time.

I am interested in the background worker and might look into that. As it standa i am doing a batch update of a couple thousand files from vault and using the background worker to ensure the user interface doesnt freeze up would be good.

 

Thanks every one for your help. I will mark both as the answer because they address the issues i was dealing with.