Page 1 of 1

Practical Way to Rename Variables after Copy-Pasting Structures?

Posted: Tue Jan 21, 2025 5:18 pm
by Nub_User
Hi everyone,

I’m working on a Vensim model where I’ve repeated the same structure (containing 25 variables) seven times. Each structure has identical architecture, but the variables have distinct names for each repetition.

When I copy-pasted the structure, Vensim automatically renamed the variables by appending an ascending number to their names. Now, I need to rename these variables to match the specific naming conventions I’m using for each structure.

My question is:
Is there a more practical way to rename variables in Vensim without manually double-clicking each variable in the sketch view and editing them with the mouse and keyboard? I’d like to avoid repetitive and time-consuming manual work.

Thanks in advance for your help!

Re: Practical Way to Rename Variables after Copy-Pasting Structures?

Posted: Tue Jan 21, 2025 10:14 pm
by aliakhavan89
You can replace the numerical sequence with a manually defined suffix when pasting the variables, if this is what you want.
Screenshot 2025-01-21 at 5.13.00 PM.png
Screenshot 2025-01-21 at 5.13.00 PM.png (110.85 KiB) Viewed 5943 times

Re: Practical Way to Rename Variables after Copy-Pasting Structures?

Posted: Wed Jan 22, 2025 6:51 am
by Administrator
If you are replicating seven times, using subscripts/arrays (only in Vensim Pro/DSS) would probably be better.

Re: Practical Way to Rename Variables after Copy-Pasting Structures?

Posted: Wed Jan 22, 2025 12:12 pm
by Nub_User
Is there a way to edit the names of variables pasted from a list, a text file, or a similar method?

Re: Practical Way to Rename Variables after Copy-Pasting Structures?

Posted: Wed Jan 22, 2025 12:14 pm
by Administrator
Not easily. You can edit the MDL file in a text editor, but you would need to do a find/replace all.