From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

typedef won't update

Solved!
Go to solution

I have a state machine (which has always worked), and I wanted to add an extra state.  But when I try to update the enum typedef, I can't.   If I open the typedef, right-clicking produces only a limited menu with no edit option.  If I right-click on the control and "edit", it's clearly not updating the typedef because when I choose "update from typedef", the changes go away.     I know I've done this before and I didn't have this problem.  What am I doing wrong?

0 Kudos
Message 1 of 7
(6,666 Views)

@HC_ocean wrote:

I have a state machine (which has always worked), and I wanted to add an extra state.  But when I try to update the enum typedef, I can't.   If I open the typedef, right-clicking produces only a limited menu with no edit option.  If I right-click on the control and "edit", it's clearly not updating the typedef because when I choose "update from typedef", the changes go away.     I know I've done this before and I didn't have this problem.  What am I doing wrong?


To update the Typedef you open it, make the change and then go to FIle -> Apply Changes and save the modifications.

 

Ben64

Message 2 of 7
(6,657 Views)

But I can't make the change.  If I open the typedef, I just get a grey popup with the list in it.  Right-clicking on the list just has five options (2nd greyed out).  They are ""Reinitialise to default value", "CutData", "Copy Data", "Paste Data" and "Description and tip".   I've looked in the menu options, and I can't see any way to update the ctl file.

0 Kudos
Message 3 of 7
(6,653 Views)
Solution
Accepted by topic author hc_ocean

@HC_ocean wrote:

But I can't make the change.  If I open the typedef, I just get a grey popup with the list in it.  Right-clicking on the list just has five options (2nd greyed out).  They are ""Reinitialise to default value", "CutData", "Copy Data", "Paste Data" and "Description and tip".   I've looked in the menu options, and I can't see any way to update the ctl file.


Are you sure something that you are running ins't using the typedef?  I get this menu by placing an enum in a while loop and running it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(6,648 Views)

That sounds a lot like you are in the Right-Click menu shown in red rather than either of the green menu options witch would open the items editor.

Capture.PNG

You don't want to operate on the data, you want to change the data type's items property.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(6,642 Views)

It was that I had another VI open (but hidden) that also uses the same typedef.   Sorry to be a muppet.    I've "saved as" the new typedef, and I'm just trying to work out how to attach the new ctl file to the control.  

0 Kudos
Message 6 of 7
(6,635 Views)

@HC_ocean wrote:

It was that I had another VI open (but hidden) that also uses the same typedef.   Sorry to be a muppet.    I've "saved as" the new typedef, and I'm just trying to work out how to attach the new ctl file to the control.  


Find the old control and replace with the new one.  Use Ctrl+F to launch the object finder and have all callers in memory


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(6,626 Views)