LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding coercion dots?

Solved!
Go to solution

Can I find coercion dots with VI scripting?

 

I have already used the VI Analyzer and know there is one coercion dot in this unfortunately large VI.

 

I have replaced a custom control cluster with a type-def control in order to get the benefit that if the type def changes, the changes will be exported everywhere the control is. I am concerned I have missed some instances. There is certainly a coercion dot on the diagram, but I don't know where. (It may be for another type.)

0 Kudos
Message 1 of 5
(4,190 Views)
Solution
Accepted by topic author cgibson

So if you select;

 

Block Diagram >>>Preformance>>>Coercion Dots

 

and set the "Single Wire" Maximum Number: to "0" and shut off the "Diagram" check mark...

Then run the VIA you should get a "Coercion Dots >>>Occurrence" in the Result List. Double clicking that occurrence should show the wire.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(4,169 Views)

Ben's answer is the most useful... but I didn't actually know the answer and I was curious.

 

So, the answer is "Yes you can find coersion dots fairly easily with VI scripting".  Something like this would do what you need.

 

coersion.png

Message 3 of 5
(4,159 Views)

It's too late to edit my post, but I realized the above code won't quite work... it wouldn't find coersion dots on any code inside of a structure, loop, etc.  You're going to want to use Traverse for GObjects with a class name of "Terminal".

Message 4 of 5
(4,138 Views)

I still kudo'd but you also should be closing the VI reference when you are done, otherwise you'll have a memory leak if done on a folder of VIs.

0 Kudos
Message 5 of 5
(4,069 Views)