iLogic SharedVariable life-cycle

iLogic SharedVariable life-cycle

MikeGillam5072
Enthusiast Enthusiast
714 Views
1 Reply
Message 1 of 2

iLogic SharedVariable life-cycle

MikeGillam5072
Enthusiast
Enthusiast

We provide an ERP interface that uses Inventor API to open documents and run iLogic rules.

 

I have a client that would like to have an external iLogic rule execute once, at the beginning of this Inventor automation session.  The purpose would be to retrieve data from Excel spreadsheets and store it in SharedVariables. Since this data is used over and over by various parts and assemblies, it would improve performance and spare them the tedium of including the same rule logic in every part.

 

However, it's unclear to me what the life-cycle of a shared variable is.  Does it go away as soon as you close the document that initiated it?

 

Please advise.

 

Thanks

Mike 

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

MjDeck
Autodesk
Autodesk

The shared variables are independent of the document.  A shared variable will stay around until you explicitly delete it, or use SharedVariable.RemoveAll()


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes