DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Disappearing variable

Hello,

 

I have inherited a lot of macros from a guy who retired. It is for evaluating crash test data.

100000+ rows of code. I am just trying to keep this working as long as possible…

I am using DIAdem 17.0.1f6881 Service Pack 1 (32-bit)

 

One macro declares some variables:

Call UserVarCompile("Multieval", "new")

 

Two of the variables declared. From multieval.vas:

CalcTime_ : R <300>

strFilter_ : A ('No','J211','IIHS','USNCAP','EUNCAP','ECE','60','180','600','1000') <'180'>

 

The value of these variables are then set in a dialog box.

 

In another macro I have this line:

Call UserVarCompile("MultievalThor", "append")

 

The variable strFilter_ disappears here.

 

When I run this:

call logfilewrite("strfilter = " & strFilter_)

call logfilewrite("CalcTime_ = " & CalcTime_)

Call UserVarCompile("MultievalThor", "append") 

call logfilewrite("strfilter = " & strFilter_)

call logfilewrite("CalcTime_ = " & CalcTime_)

 

I get in the log:

strfilter = 1000

CalcTime_ = 333

strfilter =

CalcTime_ = 333

 

Any idea why strFilter_ disappears but not CalcTime_?

And what I can do about it…

 

Thanks!

0 Kudos
Message 1 of 2
(934 Views)

UserVarCompile() is obsolete (DIAdem 2020, not sure about v2017).  The obsolete function UserVarCompile() changes the variable type and the variable content when called with the "append" parameter.

 

See this link:

 

https://forums.ni.com/t5/DIAdem/Define-a-global-user-constant-in-DIAdem-2017/td-p/3810092

0 Kudos
Message 2 of 2
(757 Views)