07-16-2009 09:53 PM
I'm trying to create a shared variable from a custom control, but the "data type" always jumps too "Unnamed Type 1". Other unused data types created from control files also exist and i imagine they are conflicting.
How do fix this and get rid of these extraneous types?
David
07-19-2009 05:31 PM
I have been wrestling with this same problem with custom arrayed controls with intrinsic data types (not clusters). Of course, being unnamed prevents using "UNBUNDLE BY NAME". Having to use "UNBUNDLE" is a waste.
Here's what I found doesn't work:
Dropping an empty array in your CTL file and then populating it with a control from the palette and assigning that to your shared variable ("Unnamed Type X" problem). For example, an array of path controls.
Here's what seems to work:
Create a separate CTL file with the scalar control you want, e.g., a single path control
Create another CTL file, drop an array on it, then populate it from the previously create scalar CTL file.
Now open your shared variable and browse to the "Array" CTL.
The name of the type should show as specified by the label on your "Array" CTL.
07-20-2009 02:56 PM
With help from NI, (it does pay to have the service contract) we found a solution. if not a reason.
After encountering the problem modify the control file by adding a control or indicator. Relink the variable to the updated ctl file. at this point you will see the old file's cluster name appear in the data type list.
Next (and the important part) is to exit labview completely. When you restart the cluster name is removed from the list, you can change the ctl file back, relink the variable and all is well in shared variable land.
I did find a couple of references to this. One was a help type document that didn't and now I can't find it... while the other is a shared variable issues file found at:
http://decibel.ni.com/content/docs/DOC-4044 Issue number 2.
But kudos to helpdesk Brian, because he got me going again.
David