Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically create references costant

How can i create a reference costant using VI scripting? I tried but I could not find how to do it...

0 Kudos
Message 1 of 11
(11,080 Views)

Hey Freddy,

are you looking for something like that:

Referenc Constant with Scripting.png

Best regards

Lorenz

Message 2 of 11
(6,670 Views)

Thanks for the answer, i've not specified my problem very well:

I want to create a QD shortucut that automatically creates a reference costant of selected references that i have on the block diagram.

0 Kudos
Message 3 of 11
(6,670 Views)

Then take the code posted, and combine it with a QuickDrop template.  LabVIEW ships with one that you can modify.

0 Kudos
Message 4 of 11
(6,670 Views)

Yes i know it,

but i can't find the way to create a costant of a specific reference...

0 Kudos
Message 5 of 11
(6,670 Views)

Freddy, can you include a screenshot that can help us understand what you're trying to accomplish?

0 Kudos
Message 6 of 11
(6,670 Views)

I guess he's talking about the difference between a reference constant in general (which seems to be what LoCa posted) and a, let's say, reference constant of type "boolean (strict)"ReferenceConstantDifference.PNG

0 Kudos
Message 7 of 11
(6,670 Views)

Freddy, perhaps you could get some clues by checking out the code behind my Commands for "Create" Menu Options shortcut? Among other things, it can create control references.

0 Kudos
Message 8 of 11
(6,670 Views)

2.png

Thanks for the answers,

I want to select some references and create constants just like right clicking them and selecting the voice from the menu. Now i need to do it one at the time, i want to do it automatically, like for example if i now use Ctrl+A on QD...

0 Kudos
Message 9 of 11
(6,670 Views)

Ok, yeah, the Ctrl-A shortcut *should* support that use case, but I just discovered that it did not. So I fixed the "Create Menu Options.vi" plugin on the download page here. Now, it will create refnum constants from control reference constants like so:

ctrla.png

Message 10 of 11
(6,670 Views)