LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom control doesn't auto update from type-def

After reading a past thread, I decided to experiment with a customized control that acts as an ordinary button. The button is really a picture ring control (with text) that has different states for idle, mouseover, mouse down and disabled. Functionally I have it working beautifully, but I noticed that my custom control doesn't auto-update when I fiddle with the type-def. Is it a known Labview issue or am I doing something wrong?

0 Kudos
Message 1 of 11
(4,686 Views)

Hi Aart-Jan,

      You sound very LabVIEW literate, but this symptom begs the question: are you saving your type-def as "Strictly-Typed"?

Cheers.

 

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 2 of 11
(4,670 Views)
Yes, I have it as a strict type def control. And literate is a very relative thing: I never really got a ful grasp of the diffrence between a "normal" type defined control and a strictly typed one. It doesn't seem to be the same a with control references at least.
I did also decide it would be fun to add animation to the control. It is going to be cool!
0 Kudos
Message 3 of 11
(4,659 Views)

Re: Strict-typing, I've only observed that it forces instances of the data-type to conform to the appearance of its type-def (so seemed related to your post.)  In fact it can be very handy to temporarily switch a type-def to Strict and apply changes...But it also limits what attributes can be changed dynamically via a property node...

..anyway, I cruised your site - nice!  But do you have a downloads page for your cool-control - or will you only share it with us?

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 4 of 11
(4,656 Views)
I am working on that. I recently bought my own LV developer license and will have to start profiling myself for Labview work on my website. I have plenty of cool, silly and handy stuff I would like to share, but need to invest some time in making a decent website for it ( and include some labview content managment functionality 😉 )

0 Kudos
Message 5 of 11
(4,653 Views)

For me, an instance of a strict typedef of a picture ring with text that was changed doesn't auto-update, but breaks the VI. Closing the typedef (or going to File>>Apply Changes or right clicking the instance and selecting Update...) causes the instance to be updated.

Is this what you meant by not being auto-updated?

If not, please post an example showing how this is wrong.

BTW, if you search the help index for typedef you will find a white paper about customizing controls which also refers to typedefs. You can also look it up in the user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 6 of 11
(4,648 Views)
Hi tst, I was wondering when you would reply. My chance to congratulate you with the 1k responses (and by now probably a lot more).

If I want to update the instance, I need to turn off auto-update first. Both auto-update or manual update don't do the trick. I never tried the file>apply changes yet, I will have to check that one. The changes do not, however, break my vi. Oddly, sofar I just solved it by doing a replace and then selecting the very same control again.
Still, I wonder, if auto-update is on, this must be a "bug" in Labview. Is it not?
0 Kudos
Message 7 of 11
(4,645 Views)
I'm not sure. I would also think that auto-update should auto-update and not break the VI, but there is probably some good reason. Note that the breaking only happens with a strict type def. A regular typedef only forces the data type (i.e. picture ring) and not the rest, so it's OK that it doesn't break the VI (and also that it doesn't auto-update the data, because the auto-updating is apparently only for the data type [although that's not very intuitive]).
 
I tried this on 7.0. Which version are you using?

___________________
Try to take over the world!
0 Kudos
Message 8 of 11
(4,637 Views)
I am using 7.1. I am sorry to not have any new findings yet. I am trying to tackle this DHTML book for my Labview website. For now it is tackling me; 1401 pages is easy to trip over Smiley Mad
I looked up your profile and saw that probably by month's end, people will congratulate you with 2000 replies!

This auto-updating is not worth tripping over, but it does bug me a little.
0 Kudos
Message 9 of 11
(4,630 Views)
Strict type defs grey out the auto-update selection because they always auto-update; you can not tell them otherwise. Auto-update could probably do with a little help in definition though.
 
Auto-Update means a control will automatically update (i.e. no user intervention required) when the associated typedef is "modified and closed" or "modifed and File >> Apply Changes" is selected. When auto-update is not enabled, you have to manually popup on the control and select Update from Type Def.
 
At the moment that you make a propagatable change to a type def (which includes appearance for strict type defs), all VIs using that typedef will break. The breakage indicates there is a difference between the instance and the type def. The VI is  not runnable until the change is applied to the control (or you disconnect it from the type def). Changes are not immediately applied because they can be expensive to apply and you may want to make numerous changes. There is no need to apply the chnges until you are done (e.g. closing the type def) or you explicitly indicate you want to apply the changes (e.g. File >> Apply Changes).
 
Roy
0 Kudos
Message 10 of 11
(4,615 Views)