Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Documents.Open + TimeOut

3 REPLIES 3
Reply
Message 1 of 4
mario.lung
328 Views, 3 Replies

Documents.Open + TimeOut

Hi,

 

when i open a dcoument and its corrupet or something else

inventor hangs

how i can set a timeout value that inventor cancle the open request

 

 

thx for help or Sugesstions

 

Mario

 

inventor 2014 / .net 

 

Tags (3)
3 REPLIES 3
Message 2 of 4

Hi Mario,

 

Unfortunately I doubt there is a way to do so ... Inventor API is single threaded so if performing an action hangs Inventor there is hardly any way to cancel it.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 4

Hey Philippe,

 

I think about a timer

as example but i dosent now how exactly i can create a timer in this situation

 

 

==> Timer Start / Limit 10min

==> Load Document

==> when over 10min TaskKill Inventor.exe

 

any Hints or Tips for me Please

 

thx

Mario

 

 

Message 4 of 4

Well if you want to use that approach, you would need to use an external exe that starts Inventor (or connects to a running instance), start a timer before opening a document, listen to some events, eg OnOpenDocument(kAfter) then kill Inventor.exe if it times up.

 

You should be able to find easily examples on the web on how to kill a process programmatically.

 

I hope it helps.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report