11-10-2017 07:38 PM
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?
11-11-2017 03:10 PM
Yes. Scripting is not supported by the lvrte. It is a development environment only feature. Ppls run in the run-time engine.
11-13-2017 12:56 PM
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.
11-13-2017 01:04 PM
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?
11-13-2017 02:13 PM
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.
11-13-2017 02:32 PM
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.
11-13-2017 02:37 PM
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
11-14-2017 09:47 AM
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
11-14-2017 11:53 AM
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!.
11-26-2017 04:40 PM
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.