question

Ankur A3 avatar image
1 Like"
Ankur A3 asked Jeanette F commented

How to find global variable occurrences in code?

Hi Team,

I have model where global variable (gv) has been used at multiple places. It is quite difficult to remember where gv has been used. Now, I want to find out all the places where it has been used.

Is there any way to find out all the lines or code section where global variable has been used?

Also, I want to change variable name at all places what is the best way to it.

Thank you!

FlexSim 21.0.10
codeglobal variablesearch
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Ankur A3, was one of Ralf Gruber's or Jordan Johnson's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Ralf Gruber avatar image
0 Likes"
Ralf Gruber answered

The Tree View´s properties include Find and Replace functions.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

Usually, you can just change the name of the global variable, and then reset the model. When the model resets, it builds all the FlexScript toggled nodes. These will all no longer build, because they use a variable that hasn't been declared. The compiler console will print out a list. You can fix a few, and click reset. Once all the errors are fixed, you know all the names have been changed.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.