LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

type def ? (re: updating)

Greetings all,
I ran into a problem with type defs. They will not update themselves
in my code, and I'd appreciate it if someone could point out what
I'm missing.

A watered down case is a simple VI with one control. I make this
a typedef and save a typedef file. So the VI has the type-def'd control
on the front panel.
Then I change the type def and save it
(this is a type def, not a strict type def),
but the vi will not update, and I can't seem to
make it update (the menu item "update from typedef"
is greyed out, and I can turn on or off the "autoupdate
from typedef" with no effect.

I have been able to do this with a "strict typedef", but not with
a normal type def.

What am I missing? Any help appreciated.


Cheers,
bob st
ockwell
0 Kudos
Message 1 of 4
(3,015 Views)
Bob,

This is a classic problem.

First you need to know the difference between a strict type def and a
regular type def.

strict type def: all properties are controlled from the type definition.
(e.g., color, size, etc.,).
type def: ONLY the DATA TYPE is controlled from the type definition (e.g.,
boolean, string, I32, etc.,).

Therefore, if you make a "change" that is in a property that is "cosmetic"
(e.g., color, size, etc.,) then the change will not be flowed down to the
other references to the definition because they think it hansn't change--and
it hasn't (with respect to the data type).

The solution is, to make your type def strict whenever you want full control
over all properties from the defintion itself.

Dave Gianetto
http://www.gianetto.org/

> From
: "R.G.S."
> Organization: RMI.NET
> Reply-To: "R.G.S."
> Newsgroups: comp.lang.labview
> Date: Mon, 4 Dec 2000 16:20:37 -0700
> Subject: type def ? (re: updating)
>
> Greetings all,
> I ran into a problem with type defs. They will not update themselves
> in my code, and I'd appreciate it if someone could point out what
> I'm missing.
>
> A watered down case is a simple VI with one control. I make this
> a typedef and save a typedef file. So the VI has the type-def'd control
> on the front panel.
> Then I change the type def and save it
> (this is a type def, not a strict type def),
> but the vi will not update, and I can't seem to
> make it update (the menu item "update from typedef"
> is greyed out, and I can turn on or off the "autoupdate
> from typedef" with no effect.
>
> I have been able to do this with a "strict typedef", but not with
> a normal type def.
>
> What am I missing? Any help appreciated.
>
>
> Cheers,
> bob stockwel
l
>
>
0 Kudos
Message 2 of 4
(3,015 Views)
Another snippet that applies to both types- after changing them, select
"file->apply changes" as well as saving them so that the change is
propagated immediately to all open VIs. Otherwise nothing seems to happen
until (perhaps?) the VIs are reloaded. Simply saving the control, on my
machines at least, doesn't cause an update even with a strict typedef, which
is counterintuitive.

David Gianetto wrote in message
news:B651C405.AD1%dave@gianetto.org...
> Bob,
>
> This is a classic problem.
>
> First you need to know the difference between a strict type def and a
> regular type def.
>
> strict type def: all properties are controlled from the type definition.
> (e.g., color, size, etc.,).
> type def: ONLY the DATA TYPE is controlled from th
e type definition (e.g.,
> boolean, string, I32, etc.,).
>
> Therefore, if you make a "change" that is in a property that is "cosmetic"
> (e.g., color, size, etc.,) then the change will not be flowed down to the
> other references to the definition because they think it hansn't
change--and
> it hasn't (with respect to the data type).
>
> The solution is, to make your type def strict whenever you want full
control
> over all properties from the defintion itself.
0 Kudos
Message 3 of 4
(3,015 Views)
Almost everything in a strict type def is propigated. The one thing that isn't (and would be very useful for me) is the default value for a control. Is there anyway to get the default value of a type def (or strict type def) to propigate to all instances?

Naveen
0 Kudos
Message 4 of 4
(3,015 Views)