LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Scripting Main Board

There's a "Replace" private method (see attached) - you wire in the reference to the FP element that you want to replace into the source reference terminal, and the you can either select a class to replace it with (it's a enum of all the good stuff that's available) or you can wire in a path to an existing ctl on disk.

Replace.gif





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
0 Kudos
Message 11 of 171
(5,007 Views)

Hi Jeff,

is it possible to install "LabVIEW scripting" on LabVIEW version 8.5 ?

best regards

Alessandro De Grassi

0 Kudos
Message 12 of 171
(5,007 Views)

Christopher,

Thanks, It's working.

I would still like to know how to copy a selection ( a single control) and paste that to replace an existing control.  It works manually, I just don't know how to do it programmatically....

If anyone knows...

Shane.

0 Kudos
Message 13 of 171
(5,007 Views)

There are methods named "Copy Selection" and "Paste Selection".

copy_paste.png

GCentral ChampionCLA
0 Kudos
Message 14 of 171
(5,007 Views)

Yes, the pasting works, but the difference is the following:

In the IDE if (on the FP) I copy one control and then select a different control and paste, the new control replaces the old one with all wiring still intact (datatype differences excluded).

I want to do this programatically, but instead of REPLACING the control, it adds a new one.

Shane.

0 Kudos
Message 15 of 171
(5,007 Views)

Sorry I read your post too fast (bad habit)...

I would explore the "Replace" method instead. I haven't tried it yet, so I don't know if it leaves the wires in place.

GCentral ChampionCLA
0 Kudos
Message 16 of 171
(5,007 Views)

Yes scripting can be enabled in 8.5.1 but the rusty nails warning applies.  It is missing some functionality but it is there.  It can easily be activated on the Mac version.  To activate it, use the same algorithm as is in the readme file for 8.6 with the obvious changes.  I assume linux version works the same way.  If you are stuck with WIndows though you may be stuck since it is a license manger issue.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 17 of 171
(5,007 Views)

Indeed, for Windows there is no chance since you do need a valid license file for that version AND need to activate it online too. The first is already not really possible since any changes to the license file would invalidate it since it is signed, but the second simply won't work unless the servers at NI do allow that activation specifically and have a specific serial number to do that. I would guess that they haven't and that NI is not going to add them.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 18 of 171
(5,007 Views)

This is not a response to rolf, but rather a new topic.

I am trying to programatically set a case structure with a string selector to be case insensitive. I know that this is possible at edit time by right clicking on the case structure and then clicking "Case Insensitive Match". I am wondering if anyone knows of a scripting property/method to do this. I am skeptical that this exists because it seems that there is no way to cast the CaseSelector GObject to be selector type dependent.

Also, what's with the blue property/invoke nodes?

0 Kudos
Message 19 of 171
(5,007 Views)

You can toggle it with the BasicObjectFlags property of CaseSelector class: you'll find there's one bit that toggles (25th bit, index = 24) when you change from Case Sensitive to Insensitive Match.

toggleCaseSensitive.png

GCentral ChampionCLA
0 Kudos
Message 20 of 171
(5,007 Views)