LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unbundle by Name shows Different Name

I have an interesting situation in my current project. I have included a VI and a TypeDef in a zip file so others can look at it.

 

It's not stopping my project, but it does seem very strange to me.

 

I have a TypeDef that I copied a control into. So far, so good. I renamed the control (both the Label and the Caption). When I connect this TypeDef to a Bundle or Unbundle by name, the original name of the control still appears. How do I change this to show the correct name? I did not want to change this to being a simple boolean control as that causes coercion dots on the block diagram.

 

Here is a pic of what's happening:

TypeDefPic.jpg

Rob

0 Kudos
Message 1 of 7
(2,833 Views)

You didn't include the typedef for the Boolean control that you are having the issue with.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 7
(2,826 Views)

The typedef cluster contains another typedef or custom control that you did not include.

 

[Edit: Need to learn to type faster Smiley Very Happy]

=====================
LabVIEW 2012


0 Kudos
Message 3 of 7
(2,825 Views)

Okay, okay. I did not include the typedef that was inside the typedef. Sorry.

 

On further testing (and moving things around), I found that even though the boolean typedef had been renamed, I had to take the original typedef and replace the boolean with the renamed one (the file name had not been changed - only the label and caption).

 

After replacing the typedef within the typedef with the same one, it works as advertised. I thought the idea of using a typedef was that you did not have to replace it everywhere that it is used.

 

I have the same problem with a graph on the front panel that I saved as a typedef - when I change the typedef, I have to replace every instance of the graph (there are 9 of them) with the new one - even though I opened it by right clicking on the graph and selecting Open Type Def.

 

Is this a bug? Or do I make sure the idea exchange has the idea to update controls when the typedef changes? Which I will do.

 

     Rob

p.s. I included the missing typedef here anyway. Go ahead and rename it and see if the top level changes. I think a typedef within a typedef is the problem.

0 Kudos
Message 4 of 7
(2,802 Views)

Do you have the typedef setup as a control?  Use typedef or strict typedef if you want the changes to take affect.  Keep in mind that not all properties will carry over with typedefs, strict or otherwise but most will.  It depends on what type of control you are using.

 

Edit:  Sorry, a little quick with the typing.  I did not notice your attached control.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 7
(2,794 Views)

No, what you are seeing is expected behavior. When using a typedef you are able to change cosmetic aspects of the control. While one could argue thta the name should not be modifiable I believe it is considered to be a cosmetic element. The data type and order are more important in keeping things aligned. The same principle appies if you modify the default value of a typedef constant. If you change the default value in the typedef itself this change is not reflected where it is used. Strict typedefs do restrict what elements can be changed when it is used.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 7
(2,792 Views)

Mark, thank you. I do now about cosmetic changes not carrying, I had thought the name of the control would not be "cosmetic".

 

My problem with the typedef graphs is that I could change everything - size, number of axes, names, etc. It never did make a difference to the graph on screen.

 

I will do some testing with strict typedefs to see what difference it makes.

 

It is interesting as well, that while a typedef is open (after having made changes to it), the VI that uses the typedef is broken. When clicking on the run arrow, the error indication is that there are unapplied changes in the typedef (even if it has been saved). Closing the typedef makes the VI runnable again (implying that changes were applied). Even though changes will not show unless re-loaded.

 

Maybe I'm just griping after a hard day of coding. I still prefer working in LabVIEW than text based languages (even though I have some Java work to do as well).

 

     Rob

0 Kudos
Message 7 of 7
(2,780 Views)