DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

VAS uservarcompile alternative

Solved!
Go to solution

Hello,

 

we want to switch from Diadem 2012 to 2021. Our Measurement system creates a .vas file with different variables like user name, test variant, timings...

In diadem 2012 we used uservarcompile to read in all variables, but in 2021 variables and values are mixed up or value gets lost. I attached a vas file as a txt file (I'm not able to upload a vas)

Is there a different way to read in the variables?

 

0 Kudos
Message 1 of 7
(366 Views)

Just tried your vas file in DIAdem 2021 and did not encounter any errors. Despite being marked as obsolete this functionality is still available.

 

Nevertheless, you could replicate it by:

 

- reading the vas file as text file

- split the lines according to the different limiters (:, <>)

- create the variables using the GlobalDim command

- set the value of the variables as read from the file.

 

The only option that is not available is to define the type of the variables as all VBS variables are of variant type by default.

DIAdem experience since 1996

Turn-key applications - Remote and on-site trainings - On-the-job training

| müller+krahmer GmbH | Koenitzer Straße 14, 07338 Kaulsdorf / Germany |
| Phone: +49 36733 / 2328 - 6 | Mobile: +49 160 / 287 7294 |
| Email: mueller@mueller-krahmer.de | Web: www.mueller-krahmer.de |
0 Kudos
Message 2 of 7
(270 Views)

Thanks for the reply,

Uservarcompile is working in general, but at some point it mixed up the variables and values. After restarting Diadem it works again...

 

Creating the variable with globaldim is working, but how do I set the value? That's my blocking point right now

0 Kudos
Message 3 of 7
(264 Views)

Like the name of the variable the value is read from the file. You could use the Execute command to assign the value to the variable.

DIAdem experience since 1996

Turn-key applications - Remote and on-site trainings - On-the-job training

| müller+krahmer GmbH | Koenitzer Straße 14, 07338 Kaulsdorf / Germany |
| Phone: +49 36733 / 2328 - 6 | Mobile: +49 160 / 287 7294 |
| Email: mueller@mueller-krahmer.de | Web: www.mueller-krahmer.de |
0 Kudos
Message 4 of 7
(248 Views)

Globaldim is working like this:

globaldim (""&mid(Row,1,Pos_Var_name)&"")

 

but for me it is not possible to assign the value to the variable.

 

Can you please give me a small hint what to do

0 Kudos
Message 5 of 7
(59 Views)
Solution
Accepted by topic author ThomasTh02

Hope this helps:

 

dim strVarName, dblVarValue

 

call GlobalDim(strVarName)

 

call Execute(strVarName & " = " & dblVarValue)

DIAdem experience since 1996

Turn-key applications - Remote and on-site trainings - On-the-job training

| müller+krahmer GmbH | Koenitzer Straße 14, 07338 Kaulsdorf / Germany |
| Phone: +49 36733 / 2328 - 6 | Mobile: +49 160 / 287 7294 |
| Email: mueller@mueller-krahmer.de | Web: www.mueller-krahmer.de |
Message 6 of 7
(34 Views)

that worked, thank you!

I just had to add " " around dblVarValue:

 

call Execute(strVarName & " = " & "dblVarValue")

0 Kudos
Message 7 of 7
(29 Views)