Head (before)

Check if Variable already exists — Simul8 Community Forum

Head (after)

Ask the Simul8 Community

Content (before)

Check if Variable already exists

Created at
in Community support

Hey guys,
is there a way to check, if a variable already exists via Visual Logic?
I've written a Visual Logic Code which triggers SIMUL8 to create multiple global variables on Reset.
Every time, when a variable already exists and the code is running, Simul8 creates a new additional variable, which has a number added to the end of the variable name.

gbl_Number1 already exists

Visual Logic Code On Reset:
"...Create Global Data Item "gbl_Number1" , Number, 13

--> Simul8 creates "gbl_Number 2" and so on...

Best regards,



Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Content (after)