Jump to content

Applying typedef changes


Neil Pate

Recommended Posts

Hi,

 

I have created some code to programatically replace the pictures in a boolean. I am applying my logic to a strict typedef and it works nicely. However my changes to this typedef do not seem to be propagated properly to a VI that uses the control.

 

In my solution the front panel of the VI with the control is open, and I have a reference to the control I wish to modify. From there I get the typedef control, and then update it using the LabVIEW resource functions. After that I update call the Update Typedef method. In the project I sometimes get a message that the file has changed if I then try and open the .ctl, and if I allow that the new skinning is indeed working, however in the original FP the control still contains the existing pictures.

 

In the typedef I cannot apply changes as this menu operation is disabled. I have tried mass compiling and it to does not seem to pick up the new changes.

 

Any ideas what I am doing wrong?

post-7375-0-40837800-1455549739.png

Edited by Neil Pate
Link to comment

Unless I'm misunderstanding something, the type def is doing just what it should and not updating unless the data type of the control changes.  If you are only replacing the pictures in a boolean, but not the actual data type, then an update won't be forced on the instances of the control.  Only a Strict Type Def will apply changes to all instances of the control, even if a cosmetic change is made.

Link to comment

Unless I'm misunderstanding something, the type def is doing just what it should and not updating unless the data type of the control changes.  If you are only replacing the pictures in a boolean, but not the actual data type, then an update won't be forced on the instances of the control.  Only a Strict Type Def will apply changes to all instances of the control, even if a cosmetic change is made.

 

It is a strict typedef.

You can go through the code, find all instances of the typedef and replace them with itself, this will actually bring them into sync.  I've done this in the past, just make sure to get the Typedef path and then replace the control with it's own typedef (from path).

Something like this? Does not seem to work for me.

 

I can get it to work if I open the typedef, change it from strict to plain, apply changes, change back to strict and re-apply changes. Then everything is in sync.

post-7375-0-16577400-1455551775.png

Link to comment

Smashing!

 

That method does work, but it looks like the FP containing the control should not be open when this occurs, so it does not seem to be like clicking "Apply". Dunno, maybe I am still doing something wrong.

 

Anyway, although this is a bit of a pain I think I can make this work now. 

 

Thanks Shaun

 

post-7375-0-22140300-1455555297.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.