Jump to content

Duplicating Property Node Properties

Recommended Posts

I've started experimenting with creating a LabVIEW development environment tool that would run and assist in various programming tasks. The initial task is to determine what is selected. This is important because you can find out what is selected then perform certain actions on these selected objects.

One small area that I touched upon was the need to duplicate the same property nodes from one control to another. First of all you would select the property node. Determine what properties are there then buffer that in memory. Finally you would re-create a new property node for a newly selected control and apply the previous buffered property items.

This works like a charm with controls of the same class. If you do it across classes then the creator node errors out. You can ignore the error but you end up with duplicate properties that were not there in the original. There seems like no way to only create properties of valid items for the new node. You have to feed it an array of property items. If one of them is invalid then you're out of luck.


This is just one example of what you can do with a tool that runs while you code. I'm thinking of adding more functionality. Several other VI utilities posted in the forums could be added as well. This could be a nice way to package all the scripting tools.

Anyone wanna help?

LV7.0 Download File:post-2-1096874964.llb

Link to comment
Just a question.

Manually, this is done with Ctrl-C, Ctrl-V and RBM>Link to...


Yes, you can do it that way too. The main motivator for my approach is when you have to do this on many many controls. It becomes very tedious.

I'm not familiar with scripting, but is it possible to invoke clipboard functions Copy and Paste and then change the control to which the property node is linked?

Hmm, interesting idea. I don't think you can invoke the clipboard with scripting but you can use some windows API. After the past you might be able to use a scripting function for re-link. I'll get right on that...

Link to comment

As far as the "Something Bigger" goes I'm right there with you. :yes:

So far I've created simple apps that do things like.

Aligning BD labels - so that when you place a control the label right justifies w/ the control

Copy Graph Properties - framework code so you can select those properties that you want to copy

Make label visible - when you copy FP controls that have hidden labels, the pasted controls terminal on the BD have hidden labels also. This is a select all and run prog, makes all selected items lables visible.

SIDE NOTE :lightbulb: : if anyone knows how to interface w/ the windows voice recognition software, wouldn't it be great to have things like these voice activated. Or even simpler, things like "create property node", "create constant", "right justify" :thumbup:

Link to comment
Hmm, interesting idea. I don't think you can invoke the clipboard with scripting but you can use some windows API. After the past you might be able to use a scripting function for re-link. I'll get right on that...


There are exposed properties nodes that allow copy and pasting anything (LV objects) to the clipboard. I have used them in the past and it work fairly well.

The attached image show where they are located or how to "recreate them" ;) .

What I mean by recreate them, is that when you know there is a method Pnl:Select All, it does not take much guessing that there will be one call BDiag:Select All or Diag:Select All :) . Getting at it can be as simple as wiring the appropriate classe specifier to the porperty/method (and the property/method "morp" to the class and stay valid) or as complicated as regenerating the whole specifier constante class + property/method node, wire them together and set the property/method class name (all by scripting of course).

:!: When you use these, watch out as it seem that there is no exposed scripting property for emptying the clipboard (which can be a pain).



Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.