LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Broken_Arrow

Easily Create Reference from Block Diagram Object (if Scripting is On)

Status: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.

Why not be able to easily create BD object references in the same manner as FP objects - assuming the user is using Scripting?

 

Create BDO ref.png

 

 

Richard






14 Comments
DFGray
NI Employee (retired)

The only issue is - what would you do with it?  You can't run scripting on a running VI, so having a reference to a BD object will just allow you to get info from it, which at run time is usually not that useful.  There are probably cases it would help, but they are few.

SteveChandler
Trusted Enthusiast

I am just starting to experiment with scripting so I don't know how I would use this but it seems useful.

=====================
LabVIEW 2012


SteveChandler
Trusted Enthusiast

I sometimes create control references only to right click the reference and create a control then drag it to a different VIs front panel. It is just an old habbit. Maybe  Broken Arrow is thinking of something like this?

=====================
LabVIEW 2012


jcarmody
Trusted Enthusiast

It would sure be easier than the current way to get a Class Specifier Constant to my favorite node:

 

reference.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Darin.K
Trusted Enthusiast

That is one of many nodes that would greatly benefit from the ability to type directly into it with a little help from autocomplete.

SteveChandler
Trusted Enthusiast

Darin, is that an idea that is posted? If not you should definately post that idea.

=====================
LabVIEW 2012


Darin.K
Trusted Enthusiast

> Darin, is that an idea that is posted? If not you should definately post that idea.

 

I have not seen that idea posted, just remembered how many times I have hovered over the class specifier constant begging for a text tool to show up.  While I am tossing out crazy ideas I have had on this subject, I have also thought about having the ability for the constant to "eat" an object similar to how a VI ref will eat a subVI.  Or, have a right-click option similar to the usual palette choices you get that lets you navigate the palettes to find the object.  Solves the I know where it is on the palette but don't know what crazy name some random NI person gave it problem.

 

Which reminds me, what BA is showing is a class specifier constant, it is not a valid reference to any BD object.  I hope this idea would not lead to confusion.

 

I think this idea addresses a valid PITA, I have to think about the suggested fix.

Broken_Arrow
Active Participant

Scripting can be used on running VI's - I'm thinking of an example where a stacked sequence structure advances by itself (available by request).

 

Darin.K, good point, it is a Class Constant, but it's still the "thing" you wire into the "ref" input of nodes.

 

p.s.... I have a Tree control populated with all of the VI Server Class Hierarchy Name Hierarchy. It would be neat to take that and create references and node from it. Any takers?

Richard






Darin.K
Trusted Enthusiast

> ...it is a Class Constant, but it's still the "thing" you wire into the "ref" input of nodes.

 

It has a Type, but its value is Not a Reference.  I am curious what "ref" input you are referring to.  I only wire it to target class or vi object class inputs.  Wiring it to a node expecting an object reference is going to toss an error.  Are you asking to give it a value so it refers to a specific object?  It seems the subset of BD scripting properties/methods which are useful and available on itself while running is fairly small.  What am I missing?

Broken_Arrow
Active Participant

 >...I am curious what "ref" input you are referring to.  I only wire it to target class or vi object class inputs. 

 

I should be more clear. You use these Classname Constants to cast a reference to more specific objects, which then go into ref inputs of nodes.

Richard