LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting - Reference all objects (traverse)

Solved!
Go to solution

Before I go ahead and create a VI that does this, are there any publically available VIs that traverse through all objects in one hit without filtering by class type and add them to an array. I would like to obtain a reference to every single item in the block diagram or front panel.

 

LabVIEW_2018-06-29_12-05-03.png



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 1 of 7
(4,572 Views)

I haven't done this with Scripting, but I have written VIs that I run when I have a Project loaded that traverse all of the VIs in memory (I run this after I load all of the Project's VIs into memory).  Once I have the names of all of the VIs, I can (in a For Loop) interrogate their properties, such as their State, Preferred Execution System, if they are Reentrant, if Debugging is enabled, etc., and can programmatically, or through an "array of indicators" display, turn on or off selected properties.

 

Bob Schor

0 Kudos
Message 2 of 7
(4,547 Views)
Solution
Accepted by topic author matt.baker

Specify a class name of 'GObject' when using the Traverse for GObjects.vi. That should do the trick.

 

Why are you wanting to do this?

Message 3 of 7
(4,538 Views)

It's related to this: https://forums.ni.com/t5/LabVIEW/Resolve-conflicts-Missing-file-problem/td-p/3811148

 

I was going to go through every object that can be linked to a type definition, or a VI and check for incorrect paths (after casting it back).

 

If only there was a right-click plugin that showed the class ID and name of any selected object to make it easier to filter certain types.



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 4 of 7
(4,516 Views)

I think just 3 calls to Traverse for GObjects.vi, one for SubVI, one for Constant, and one for Control, should do the trick. No need to traverse for everything.

Message 5 of 7
(4,506 Views)

I'm also looking for traversing all objects.  This is for adding a free label just above the top object in the block diagram and to move them all together.

 

Thanks,

Ajay

--
Ajay MV


0 Kudos
Message 6 of 7
(4,297 Views)

Just found that giving "GObject" will retrieve all BD objects.

 

GObject connected to Traverse vi will fetch all objects in VI scriptingGObject connected to Traverse vi will fetch all objects in VI scripting

--
Ajay MV


0 Kudos
Message 7 of 7
(4,294 Views)