LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get an invalid GObject refnum class

Solved!
Go to solution

Hello, I am wrapping my head around improving Traverse for GObjects.vi. My issue with it is that I have to specify the class to search by string and then take the GObject refnums and change it to more specific class that I searched for. I would like a VI where I input the GObject refnum and already receive the same datatype out.

VitSlay_1-1737541429048.png

 

When I create a LabVIEW Constant refnum from scratch, it is not valid and I can't read the Class name property. I can take an existing GObject refnum though and by reading the Class name property i can get the string nicely.

 

To make this work correctly, these other approaches come to my mind:

  • Get control GObject reference in the SubVI, reading Terminal > Data Type (returns variant with value 00000000)
  • Somehow validate the incoming refnum (no idea how)
  • Get reference of SubVI calling GObject block in top VI (it seems there is no way) and get the string in the connected constant. (it also seems there is no way)
  • Creating an Express VI, which has the reference of calling subVI GObject somehow (I would like to avoid this)

 

0 Kudos
Message 1 of 2
(68 Views)
Solution
Accepted by topic author VitSlay
0 Kudos
Message 2 of 2
(44 Views)