03-14-2020 01:15 AM
I'm creating a plugin for selecting properties and methods, and I need to have the plugin create helper files with property and method info for the plugin to use on subsequent runs. I would like these files to contain private and scripting properties and methods, even if those are not turned on in the user's ini file and preferences. (Thus, the file will have the properties available if the user turns on those features)
I think I can turn on private methods programatically by temporarily modifying the LabVIEW ini file. However, I can't figure out how to temporarily turn on scripting.
I did find a private application method called Allow Scripting, but when I run it it gives me Error 1036:
Any ideas how I might accomplish this? Or should I simply rebuild the files in the event that the user turns on these options?
03-14-2020 04:24 AM
There is
server.viscripting.showScriptingOperationsInEditor=True
in the LabVIEW ini file.
03-16-2020 01:25 AM - edited 03-16-2020 01:55 AM
Thank you. I see it now. There was a long gap in my ini file, so I didn't see the settings at the end.
This should help me write my function. Now I need to know if it's possible to alter the ini file, save it, and refresh LabVIEW to use the new settings programatically. It appears that the "Refresh Menus" Application method does not do this.
03-16-2020 01:55 AM - edited 03-16-2020 01:57 AM
@littlesphaeroid wrote:
Thank you. This does not show up in my ini file for LV2019, which is why I did not find it. Perhaps I'm looking at the wrong ini file...
It's not there. You have to put it in.
The default value (when it's not there) is false. For obvious reasons they choose to not put in the file.
Never mind. You edited that while I was typing. I think it was off anyway.
03-16-2020 11:59 AM
Good point. I had scripting on but couldn't find that line in the ini file. Appreciate your help!
03-16-2020 12:30 PM
There are LabVIEW.exe export functions to read\write from\to the internal ini file. IIRC, there are even VIs to interface with them. Couldn't find them in a quick search though. The problem with this interface is that you can set the value, but that might not trigger the internal mechanisims. So the value will be set, but won't be used until you restart LabVIEW.
03-16-2020 01:18 PM
wiebe@CARYA wrote:
There are LabVIEW.exe export functions to read\write from\to the internal ini file. IIRC, there are even VIs to interface with them.
Are you refering to the VIs in "..\National Instruments\LabVIEW 20xx\resource\dialog\lvconfig.llb"?
03-17-2020 03:08 AM
@UliB wrote:
wiebe@CARYA wrote:
There are LabVIEW.exe export functions to read\write from\to the internal ini file. IIRC, there are even VIs to interface with them.
Are you refering to the VIs in "..\National Instruments\LabVIEW 20xx\resource\dialog\lvconfig.llb"?
Yes! If you leave the input path empty, those function should use the LabVIEW.ini file that is in memory.