Head (before)

Check if Variable already exists — SIMUL8 Community Forum

Head (after)

Ask the SIMUL8 Community

Content (before)

Check if Variable already exists

SeMSeM
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.

Example:
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,
Sebastian



Tagged:

Comments

Leave a Comment

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

Content (after)