From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

example of GetSubProperties URGENT!!!

Hi All,

I get a message of UIMsg_ModelState_EnabledStateSet and I'm trying to get the "ModelType" variable that located at the first index of the array.

The COM array I got from line:

 

PropertyObject myArrayVariable = (PropertyObject)uiMsg.ActiveXData;
PropertyObject[] value = myArrayVariable.GetSubProperties("Parameters.ModelData", 0);

 

value is an array and have 15 places.

How can I get the variable base on location???

Tnx

 

 

0 Kudos
Message 1 of 2
(3,799 Views)

You should be able to use the GetPropertyObjectByOffset() method to access elements in the array. For example, if you wanted to access the third element in your array:  myArrayVariable.GetPropertyObjectByOffset(2,0)

 

Hope that helps, and let us know if you have any more questions about it!

0 Kudos
Message 2 of 2
(3,783 Views)