Ben, I understood what you said but I would like to use a cluster (saved as strict typedef) with all references because I have several subvis and would be great to have this cluster connected to all the subvis, and each subvi having a copy of this cluster (as a control), as the input of the subvi. If I update the cluster with the references, all controls in all subvis will be updated too, since they are all connected to the same strict typedef.
Nevertheless, this works great until I close and open again the main VI. After that I start getting a lot of "Objetct Reference invalid" messages.
I changed a little bit my procedures. Here are the steps that I am following:
- open a blank VI;
- create two graphs in the front panel;
- in the block diagram, create references for both graphs;
- connect these references to a bundle (not bundle by name);
- create an indicator for the bundle;
- run the VI once;
- right click on the bundle indicator and change it to a control;
- delete references and bundle;
- select the control in the front panel, go to EDIT, CUSTOMIZE CONTROL;
- change to strict type def;
- save this control as Control1.ctl and close it;
- convert this control into a constant;
- right click on this constant and create some controls from this constant;
- Put these controls (that were created from the constant of the main VI) into the subvis (to be the control connected to the input terminal of the subvi);
- connect the constant of the main VI to all these subvis;
- inside each subvi put some property nodes to get information from the references (i.e. Label.Text);
- run the main VI.
Everything works great. The constant that is linked to the Control1.ctl (strict typedef) will feed all the subvis (that have controls created from the constant of the main VI, and because of that all these controls are also linked to the Control1.ctl (strict typedef). All the subvis run their codes properly.
but........................................................
If I save the main VI and all the subvis, close everything and open again the main VI and run it, I get a lot of 'Object reference is invalid messages'.
Why?
Why it was working before?
This code is very important for me because since I have a lot of subvis, if I have a constant into the main VI (as s strict typedef) with all the references, and copies of this constant into each one of the subvis (as controls), when I update the main constant into the main VI (adding a new reference for a new object that I've just created, for example), all the controls inside all the subvis will be updated properly.
What am I doing wrong?
Thanks
Dan07
Message Edited by dan07 on 04-12-2010 10:49 PM