Author: Karsten van Zwol (NI)
This plug in assists with removing coercion dots from you block diagram. It adds the option 'Insert Conversion Function' when you right click a wire or a selection that includes wires that has at least one destination terminals with a coercion dot. When activated it inserts the appropriated conversion function(s) based on the terminals with the coercion dot.
Before:
After:
The attached llb is saved in LabVIEW 2015. For install instructions, go here.
The attached zip file also contains a Quick Drop Plug in with default shortcut key Ctrl +
Extract the zip file to your [LabVIEW Data] folder.
[UPDATE 13-Sept-2015]
- Now inserting one conversion function for multiple destinations of the same type
- Handling additianl functions where type depends on output and not connected terminal (Like Divide, BuildArray).
- Handling Enums and TypeDefs (not inserting when representation of source and destination matches).
- No more LV2013 support for Quick Drop Plugin (Wire:DisconnectTerminal method not available in LV2013).
- Disabling menu options when no conversion function available for coercion dot. (Shown below on TypeDef wire)
I like the idea, but there's one bit of sophistication that it must have.
If you have a coercion dot on a numeric array, that indicates that LV has to do work to convert the array. If there's only one destination for your array, I generally don't worry about the coercion dot. But if there are two destinations, LV does double work, one for each terminal. So the coercion bullet needs to be added *at the common junction of the two*, not on each fork. If you add at each fork, you've saved nothing and except suppressed the valuable warning. So if there are 2 or more forks that are all the same type, you should create the bullet and then rewire to those terminals. Any other forks that re different types should get their own coercions.
yes, that's the next step . The same thing occured to me but since it's my first time looking into scripting I decided to do the generic solution first instead of adding the an additional layer of complexity from the start.