LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

It is possible to update a type def or strict type def constant during runtime?


@Baji wrote:

Thanks for the reply. Do you have any Ideas or sugessions achieve the task. I attached the snapshot for better understanding of my requirements.

 

16979iE4DCDD5769843924


That looks like what I described!

 

The top enum selects the action and the left enum indexes the value.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 19
(1,088 Views)

This VI working fine for me,But if i do any change or Addition to the parameters in the file, i need go back and change the enum Parameters too. any ways to automate this??

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 12 of 19
(1,082 Views)

If the enum that selects which set gets updated, and its type-def'd then all previous instances should be OK and where the new enum value is used, the same enum should get updated when the enum's type def gets updated.

 

I think we are close and only language standing between us.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 19
(1,077 Views)

Thanks Ben for your efforts.

As you said the language is standing between us. Can you give me a small example code for quick understanding.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 14 of 19
(1,071 Views)

No but if you post that VI along with the type defs that go with it and I'll stick around after work for a couple of minutes.

 

Else you will have to to wait until Monday.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 19
(1,065 Views)

I attached my VIs

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 16 of 19
(1,056 Views)

I was about to tell you too...

 

pop-up on the Prameter Name .... Open type def  ... replace with enum

 

but that wil not work becuase you have duplicate strings in that ring. If it where not for the duplicates ... should there be duplicates?

 

If not use an enum instead of the ring.

 

Ben

 

PS the plus 1 thing will have to go.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 17 of 19
(1,048 Views)

You're still not going to be able to update this typedef at runtime. Scripting will allow you to udpate the enum, but the VI has to be in edit mode. Which means you won't be able to do it inside of an application, or while the VI that's using the enum is running.

0 Kudos
Message 18 of 19
(1,043 Views)

@smercurio_fc wrote:

You're still not going to be able to update this typedef at runtime. Scripting will allow you to udpate the enum, but the VI has to be in edit mode. Which means you won't be able to do it inside of an application, or while the VI that's using the enum is running.


True.

 

But will pick-up the new value changes from file after its re-started. Whn a new selection is added to the file the code that uses it will have to get a new enum value to select the new column from the text.

 

But then again maybe I am not on the right page.

 

Ben

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