04-21-2011 04:32 AM
Hi all
I am at the end of my knowledge
How can I copy via scripting a queue ref control from a front panel to a typedef control
Thanks
Jürgen
PS
LabVIEW 2010
04-21-2011 08:10 AM
Use the Move method (on the reference to the queue ref) instead of copy/paste. The owner will be the reference to the panel of the control.
Note that under scripting, controls are essentially VIs without block diagrams. You create a new one with the New VI primitive.
04-21-2011 08:27 AM
Hi
i trye but it is not working
Can you give me a example ?
Jürgen
04-21-2011 08:49 AM
The owner needs to be the panel of the control, not the control itself.
I have attached the full sample code. For some reason, I could not attach a snippet.
04-21-2011 08:57 AM
Move doesn't work across VIs.
Do this: Get the type descriptor for the control then use the VI method "Create Control From Type" (or something like that) to actually create the control on the control VI.
04-21-2011 09:13 AM
You can also use the VI's Create from Reference method and give it the reference to your original control. This RCF plugin has an example - https://decibel.ni.com/content/docs/DOC-5812
04-21-2011 09:38 AM
Hi
Thanks for the help
So here are some information what is my idea.
I am writing a tool to create a VI hierarchy.
For that I need the possibility to create a type def with different controls on it.
Write now it is working only for on element the second one i got this error
DFGray that works with the panel but then I got this error
[ The front panel contains extra controls that do not belong to the custom control. You must delete these extra controls.)
Jürgen
PS
I like this scripting and I hope there will come also soon a API to Icon editor via scripting
04-21-2011 09:42 AM
Specify the cluster as the owner instead of the panel and the control will be moved into the cluster instead of onto the panel. This should take care of the error.
04-21-2011 09:55 AM
Yes this works
Jürgen