LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having trouble with updating type-defs

Solved!
Go to solution

Hi

 

I am trying to use type-defs, but having trouble with updating them. auto-update dont update and "review and update from type def" is grayed out. what am i doing wrong?

 

see attached project, which contain little else than one typedef.

 

Best regards Jan Egil Glæstad

Download All
0 Kudos
Message 1 of 8
(2,672 Views)
Solution
Accepted by topic author JanEgilGlaestad

A appreciate you attach a simple clear project to show what is going on for  you.  However, when I open project, I don't see anything wrong.  I do see the menu image you see, but the reason nothing is wrong is because there is nothing to update.

 

In your project, are you having this problem with a string?  Or other datatypes?

 

It is very odd to turn a string into a Typedef because a string is a string.  Probably nearly 100% of typedef's are of two basic datatypes, an enum and a cluster.  Those are items where the underlying datatype changes drastically either by adding or subtracting line items from an enum, or adding or subtracting various controls to a cluster.

 

The need to review and update will happen time to time when that instance of the typedef becomes out of sync with the typedef file.

I've never turned off the Auto-Update flag on an instance so I really don't know what is the advantage of having that item unchecked in the menu.

 

But like I said, a string is a string and there is really nothing you can do to it to change the underlying data structure

Message 2 of 8
(2,622 Views)

thanks, now i understand. 

 

i tried to make simple example as possible, therefore just the string. i thought that changing the text in the typedef string was enough to trigger a need for update (i meant the text to differ from typedef to typedef-insertion).

 

now i tried to put the string in a cluster, and this triggered need for update. typedef is of course a data-type definition.

0 Kudos
Message 3 of 8
(2,608 Views)

Yes.  What you typed into the string is just a "value".  It didn't change the "definition" of the datatype.

0 Kudos
Message 4 of 8
(2,602 Views)

@RavensFan wrote:

Probably nearly 100% of typedef's are of two basic datatypes, an enum and a cluster. 

 

But like I said, a string is a string and there is really nothing you can do to it to change the underlying data structure


Well, I agree with RavensFan's first statement, but I have a few TypeDefs that are "other", and just "invented" a String TypeDef I call "Big Bold Red".  I took a String Control, changed its size to 18 points, its Font Style to Bold, and its color to Red, saving it as the type Big Bold Red.  I then wired an ordinary String Control (15 pt, Plain, Black) to a blank indicator of type Big Bold Red, and when I ran the routine, guess what showed up in the indicator (hint -- it was Big, Bold, and Red).

 

Bob "Picky, Picky" Schor

0 Kudos
Message 5 of 8
(2,593 Views)

@Bob_Schor wrote:

Well, I agree with RavensFan's first statement, but I have a few TypeDefs that are "other", and just "invented" a String TypeDef I call "Big Bold Red".  I took a String Control, changed its size to 18 points, its Font Style to Bold, and its color to Red, saving it as the type Big Bold Red.  I then wired an ordinary String Control (15 pt, Plain, Black) to a blank indicator of type Big Bold Red, and when I ran the routine, guess what showed up in the indicator (hint -- it was Big, Bold, and Red).


That can be a simple Custom Control.  Then you don't have the linking.  Or you make it a Strict Type Def, which makes everything have the same settings (formats, colors, etc.).  Both of these are more applicable to your situation than a simple Type Def.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 8
(2,587 Views)

@Bob_Schor wrote:

@RavensFan wrote:

Probably nearly 100% of typedef's are of two basic datatypes, an enum and a cluster. 

 

But like I said, a string is a string and there is really nothing you can do to it to change the underlying data structure


Well, I agree with RavensFan's first statement, but I have a few TypeDefs that are "other", and just "invented" a String TypeDef I call "Big Bold Red".  I took a String Control, changed its size to 18 points, its Font Style to Bold, and its color to Red, saving it as the type Big Bold Red.  I then wired an ordinary String Control (15 pt, Plain, Black) to a blank indicator of type Big Bold Red, and when I ran the routine, guess what showed up in the indicator (hint -- it was Big, Bold, and Red).

 

Bob "Picky, Picky" Schor


I did says "probably nearly 100%".  I know there are exceptions.

But I agree with Crossrulz that it is really more of a strict typedef you would have made since you only cared about appearance.

0 Kudos
Message 7 of 8
(2,565 Views)

@RavensFan wrote:

...

I've never turned off the Auto-Update flag on an instance so I really don't know what is the advantage of having that item unchecked in the menu.

...


That along with "Disconnect from type def" can be used when we need to "freeze" a data structure and prevent it from being updated.

 

Very handy when we have to maintain compatibility with deployed systems while implementing enhancement for new functionality.

 

Example:

I have deployed images to run on 180 cRIOs to control a process that takes 3 month to complete. Issues found during that process can be corrected an deployed to the other cRIO not tied up with the long process.

 

Just my 2 cents,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(2,558 Views)