09-16-2023 08:53 AM
I am following the steps outlined on the NI support page https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHw5CAG&l=en-US to set the default value of a global variable. A part of the diagram given on the page is shown below:
When I try step 8, the "Default Vals.Make Curr Default" option is not available in any of the menus/submenus. I am using Labview 2020. Is this available only in the newer versions? Is there any way to accomplish it in 2020?
Thank you.
Girish Joglekar
Solved! Go to Solution.
09-16-2023 09:20 AM
I see it in LabVIEW 2020. Did you enable scripting?
Can you show us the rest of your code, maybe attach it? (Of course the article does not mention globals. What exactly are you trying to achieve with all this?)
09-16-2023 04:50 PM
Yes, such an oddball request usually means that we should be asking "why" not "how".
09-17-2023 08:03 AM
Attached are setverpath.vi and verpath.vi which is a global. I want to set the string in verpath.vi to a desired value using setverpath.vi. The string in the verpath.vi is used by other vi's to get the path to the current version. In setverpath.vi will be executed once when creating a new version.
BTW, 'enable scripting' did not make any difference.
Girish
09-17-2023 08:25 AM
09-17-2023 08:54 AM
Thank you. That worked.
Girish
09-17-2023 10:01 AM
I still would like to know the "why" because it seems we are just enabling bad coding that will lead to heartache down the road. I can't think of why I would want to do this. Well, that's not true. I can think some reasons, but they are all bad. Like setting a default and constantly overwriting current values with the default value, which is just asking for trouble.
09-17-2023 12:11 PM - edited 09-17-2023 12:23 PM
@billko wrote:
I still would like to know the "why" because it seems we are just enabling bad coding that will lead to heartache down the road. I can't think of why I would want to do this. Well, that's not true. I can think some reasons, but they are all bad. Like setting a default and constantly overwriting current values with the default value, which is just asking for trouble.
I fully agree!