DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

OdsValAlloc command

Highlighted
Can you help me understand why the following code does not work.

******************************
Call OdsValAlloc("Elvis","ODS_TYPE_STRING")
Elvis = "Graceland"
MsgBox Elvis_
Call OdsValFree("Elvis")
**************************************

I get the error below....

Error in (Row: 1, Column: 2):
Type mismatch: 'OdsValAlloc'

DIAdem version is 8.00.981
0 Kudos
Message 1 of 6
(1,908 Views)
Hi Sarm,

First start with a newly launched DIAdem, then execute your above code with the following changes. Note the 3rd parameter in the first line and the missing underscore_ in the third line.

Call OdsValAlloc("Elvis", "ODS_TYPE_STRING", 0)
Elvis = "Graceland"
MsgBox Elvis
Call OdsValFree("Elvis")

Let me know if this still gives you trouble,
Brad
0 Kudos
Message 2 of 6
(1,908 Views)
I made the 2 changes and got the same error.
0 Kudos
Message 3 of 6
(1,908 Views)
I tried the code Brad posted with version 8.1.1534 and it is working correctly.

Do you have access to version 8.1 to test this?

Otmar
Otmar D. Foehner
0 Kudos
Message 4 of 6
(1,908 Views)
No, unfortunately I do not have access to version 8.1.
0 Kudos
Message 5 of 6
(1,908 Views)
You can download a demo copy of version 8.1 from www.ni.com/diadem.

It will run for 30 days and allow you to verify that things are woking on your computer.

Otmar
Otmar D. Foehner
0 Kudos
Message 6 of 6
(1,908 Views)