LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Scripting Main Board

jon_mcbee: To the best of my knowledge, no, there is no programmatic access to that window.

0 Kudos
Message 141 of 171
(1,962 Views)

While LabVIEW won't give you access to it, Windows will. Download labview_win_util32_86.zip from this link. Open "Move Window.vi" from under the "WINUTIL.LLB" file that is in the zip you downloaded. Type "Tools" in the "window name ("")" input, set your desired new position and click run. Note this is for Windows and 32Bit LabVIEW only!

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Message 142 of 171
(1,962 Views)

Great recommendation, Charles!

From your link: The abilities of the VI Server supersede the functionality of the VIs.

Evidently that's not true!

0 Kudos
Message 143 of 171
(1,962 Views)

You can always find corner cases and esoteric use cases. In general that statement is very true.

Rolf Kalbermatter
My Blog
0 Kudos
Message 144 of 171
(1,962 Views)

Thank you for the link!  I hadn't come across this before.

0 Kudos
Message 145 of 171
(1,962 Views)

You could probably do it through mouse click simulations in white space to bring up the menu, or short cut key fake-out and then mouse click simulation.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 146 of 171
(1,962 Views)

When trying to write a QD Shortcut VI to create some decorations for clarifying the SubVI control INs and indicator OUTs, as seen below:

subVI-FPdecorated.PNG

I must admit defeat in creating the bold and underlined labels "IN" and "OUT". They always appear on the BD, not the FP, although I call the QD dialog box from the front panel. When looking at the style constant for New VI Object - which do I have to use instead. "Free Label" is, as far as I remember, given to both label types - those on the front panel and those on the block diagram.

k-VIsnippet.PNG

Any hints as to which style constant value I need to use for this? Also - is there a way to find out by oneself? The HELP file for New VI object points to Control Property: Style ID - couldn't find this property anywhere though. An eye-opener would be appreciated here. Thanks in advance.

EDIT: Found "kind of" the style: Label (modern) or Label (system). However, those have 3D background and therefore are not strictly the type of object I want to create. So just for academic purposes: What style is to be selected for those transparent free font panel labels?

Nachricht geändert durch comrade

0 Kudos
Message 147 of 171
(1,962 Views)

The New VI Object has an owner input, which specifies where the object will be created, although a quick test with both the panel and pane references fails. What does succeed is creating the label on the BD and then moving it to the FP using the Move method on it.

Also, in general, it's often easier in scripting to create what you need beforehand and then just create a copy of it or move it. In this case, that would mean creating the three decorations in your VI (or in another) with their final design and then simply using the Move method to copy them over to the VI you're working on.


___________________
Try to take over the world!
Message 148 of 171
(1,962 Views)

Thanks for this insight - since I just started with VI scripting I never knew about this "copy and paste"-type of approach. Opens quite a lot of possibilities to easier achieve what I want to do.

0 Kudos
Message 149 of 171
(1,962 Views)

If you are going to use the copy/paste approach, you may want to consider using the higher level scripting engine which ships with LabVIEW.  It has over a decade of bug fixes and optimizations that would be hard to duplicate on your own.  You can find details here.  Available on Windows and Linux.  If you need a Mac version, let us know.

This engine is used by the DAQ Assistant, Instrument I/O Assistant, SignalExpress, and many other things which script LabVIEW code.

Message 150 of 171
(1,962 Views)