LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Reference created by scripting removed in build

I have a template VI that is duplicated with another set of VIs. Within, there is a control that is copied, replaced on the VI panel, and, using scripting, a reference to this control is placed on the BD and wired to a subVI. It works and produces a new VI with no broken arrows. 

 

When I build this VI into a packed project library, the references are removed and the resulting VI is broken.

 

Creating and wiring this reference manually does not exhibit this problem. 

 

This problems exists in LV 2014-7

 

Is there some reason why a reference created using VI scripting would not be preserved in a build?

 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 12
(4,247 Views)

Yes.  Scripting is not supported by the lvrte.  It is a development environment only feature.  Ppls run in the run-time engine.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 12
(4,195 Views)

I must not have explained properly: The script runs in the development environment, acts on another VI, where it creates and wires a control reference. Then, when I build the PPL that includes the script-modified VI, the control reference is removed, leaving the PPL broken. There is not scripting within the PPL itself.

 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 3 of 12
(4,157 Views)

No, Apparently I did not understand.

 

By Template VI you mean a *.vit file right? if not why not?

 

By "Another Control" What Control? Is it part of the project?


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 12
(4,154 Views)

You did misunderstand, and I'm sorry for trying to take responsibility for this by suggesting that I was not clear. You thought that I was using scripting within the library that becomes a PPL, which, I've explained, I am not. Thus, your response represents not an answer to my problem, but a misunderstanding of  the problem.

 

Let me explain further:

 

I am not using a vit.  I use a template library (lvlib) that contains a control and two VIs. The library and its contents are programatically copied, renamed, and the control is also renamed and re-linked to the copied VIs. This control is a cluster, and both VIs have a reference to this control wired up within them. The copy, rename and replace of this control results in the reference being deleted. Thus, I programatically recreate this reference and wire it, using VI scripting. If I do that step manually and then build a PPL, it's fine. If I do that step using VI scripting and then build the PPL the references are stripped and the PPL has broken VIs within it.

 

That is the problem.

 

 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 5 of 12
(4,147 Views)

Well then its fairly safe to say your tool is wrong.  Since all of those things work absolutely fine using the Project Templates. Zip up your library and lets peek at the tool.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 12
(4,143 Views)

That sounds like a bug but to get NI to log a corrective action report, could you put together a very small example?

 

NI support could duplicate your process and witness it for themselves.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 12
(4,139 Views)

I am still curious about this issue.

 

If the issues is as you have reported, that means that LV, behind the scenes is tracking how a control ref was created and deleting those created by scripting OR there is  a flaw in how scripting creates a reference that result in it being lost as you reported.

 

So if you get a chance, could you pass some example code to NI Support and share the service request number, please?

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 12
(4,127 Views)

Ben, I really want to thank you for chiming in. It's nice when you get a response from someone who isn't telling you you're an idiot/wrong/unclear.

 

My code is complex and sprawling enough that I want to spend a little time making a simplified example to demo this issue. I will try to get something here today. 

 

Meanwhile, I've opened a ticked with NI. It does appear that the way the control is created is somehow tracked! I need to test if it's the creation or wiring step that is at issue by creating the control manually and wiring pragmatically

 

More soon!. 

_____________
Creator of the BundleMagic plugin for LabVIEW!
Message 9 of 12
(4,121 Views)

As a followup, I made a simple test case and was not able to reproduce this issue. Yet the issue remains in my main application instance. I will keep trying to track down the problem. Thanks for taking an interest. 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 10 of 12
(4,089 Views)