How to find global variable occurrences in code?

How to find global variable occurrences in code?

rajankur6494
Advocate Advocate
28 Views
3 Replies
Message 1 of 4

How to find global variable occurrences in code?

rajankur6494
Advocate
Advocate

[ FlexSim 21.0.10 ]

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!

Accepted solutions (1)
29 Views
3 Replies
Replies (3)
Message 2 of 4

JordanLJohnson
Autodesk
Autodesk

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.

.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 3 of 4

ralf_gruber
Collaborator
Collaborator
Accepted solution

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

0 Likes
Message 4 of 4

Jeanette_Fullmer
Community Manager
Community Manager

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