Message 1 of 2
iLogic: SharedVariable not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
SharedVariable is giving me a "Variable does not exist." error when I use it in another rule.
Here is how I created the variable:
Dim StringerLength As Integer
StringerLength = Parameter("Stringer Left", "cutref4") + (StringerHeight / Sin((angle / 180) * PI)) - (Parameter("Stringer Left", "width")/Tan((angle / 180) * PI))
SharedVariable("StringerLength") = StringerLength
And using this variable in another rule as follows:
AvailableLength = SharedVariable("StringerLength") - rise*Sin((angle / 180) * PI) - BoxWidth/Cos((angle / 180) * PI)
Error message:
I should also point out that this code is working perfectly on my colleague's system, so it might be something to do with my version of Inventor (I've updated it and re-installed). Is there an error with the way I am declaring the shared variable? Would appreciate any guidance.