VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Access System Definition Custom Device Item Poperty from Custom Workspace Object

Dearest Team VeriStand,

 

I wish you the warmest of greetings on this lovely spring day.

 

I'm attempting to display data stored in my system definition file associated with my custom device in my custom workspace object, but LabVIEW's not cooperating with me. Tisk tisk.

 

I know the data has been successfully saved in the system definition file because I can edit the data displayed on the custom device page in the system explorer, close VeriStand, reopen it and the changes I made are present.

 

I'm attempting to access the properties via the .NET API. I've tried two different methods using the API and both are returning empty arrays. See below.

 

Property Test.png

 

To note, the names and GUIDs are just placeholders for the snippet. In my actual code, I'm using the GUID global variable and a constant VI to ensure there aren't any naming issues. 

 

This code works neither in the development enironment nor when called as part of the custom workspace object in VeriStand. In the development environment, there are no errors and the GetDoubleArrayProperty remains false. The name property returns the name inputted to the constructor, but I don't think that tells us very much.

 

Is this the right way to access this data? Am I doing something wrong? Is there an alternate method to access custom device item properties?

 

Any guidance would be oh so appreicated!

 

Thanky kindly,

Mike

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

That won't work, you're actually creating a new instance of a custom device with the constructor node.

You can look at the workspace tool example (hidden in the LabVIEW examples directories): a workspace tool can use the RootType object of the running system, it represents the root of the system definition file. From there you can browse to your custom device reference and and obtain its properties (using a part of the code in your snippet).

 

Alternatively, the definition file path is also fed to a workspace tool, it gives a slightly different access to the system definition file (the APIs are similar), it may be easier for a first dive into this kind of endeavor 🙂

 

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

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

Hi Eric,

 

Thanks a lot for your reply! That was silly of me not to realize I was instancing a new cutom device. Smiley Embarassed

 

As you suggested, I found it easier to work with the system definition file path than the RootType.

 

GetCustomDeviceProperty.png

 

I'm not sure if this is quite what you had in mind, but at least it's working.

 

Mike

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