From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

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

Can we get consistent naming and datatypes for equivalent properties vs. event terminals?

Status: New

There are many properties that have equivalent event terminals. Unfortunately, they are often named or typed slightly differently, creating lots of coercion dots for no real good reason.

 

(I've run across many more over the years, so this is a very incomplete list. Feel free to post other cases here ;))

 

For example (property vs. event terminal)

 

Active cursor (U32) vs. CursIdx (I32)    (why U32 vs I32?)

Cursor.position (Cursor X, CursorY) vs. CursLoc(X, Y) (example from here)

 

(note the coercion dot on the event output tunnel)

 

1 Comment
JackDunaway
Trusted Enthusiast

It seems the most common typedefs recreated within the base package (fresh install) are:

 

Row Column pairs

X and Y (and Z) points

Horizontal and Vertical location

Width and Height size

Major.Minor.Rev.Build versions

Major and Minor color (or Foreground and Background color)

Min and Max and Increment

Left/Top/Right/Bottom bounds

 

Attached is a VI snippet used to scrape these trends that traverses the vi.lib for *.ctl files and returns all clusters that contain only numerics. Brute force and primitive, but it uncovers a few low-hanging fruits where data structures could be consolidated.

 

Spoiler

Takes a while to run (8 minutes for me), but I've included the LabVIEW-obligatory Stop button.

ScanVILibForNumericClusters.png

 

(Apparently, the snippet is not properly placing the indicators on the second tab, the indicators are dropped behind the tab on the FP. Move the tab control to see those indicators. About to file a bug report...)