10-14-2012 01:41 PM
Well, it's pretty straight foward...
Can be any kind of answer, error, no error, Style ID anything.
But I don't see to find an answer.
Please help 🙂
Solved! Go to Solution.
10-14-2012 03:39 PM
You pretty much answered your own question: the Style ID property can tell you that. You need to have scripting enabled to access that property.
10-14-2012 09:30 PM
And can I run the VI in run time using scripting?
10-15-2012 03:03 AM
No, you cannot use scripting in the run-time environment; you can only use it in the development environment.
10-15-2012 07:58 AM
So there is anyway to know in run time enviroment if the LED is rounded or squared?
10-15-2012 08:05 AM
Even though the Style ID property is only visible when you enable scripting, it can be used at run-time. See the LabVIEW help for details.
In general, VI server properties and methods which inspect things can usually be used with only the run-time engine (provided what they are inspecting exists). Properties and methods which modify code cannot, since they will require a recompile of the code.
10-15-2012 08:22 AM
I couldn't find a direct approach. Something far-fetched may be to use the Invoke Mehtod to obtain the front panel image of the control and using some kind of image processing algorithm to know if the control is round or rectangular. This is just an idea.
10-15-2012 08:23 AM
10-15-2012 08:33 AM
Running some tests here it's seems to work 🙂
Thanks for the help
For the one that also wondering how to do it:
- First Download the Scripting from this link and follow the instructions to enable scripiting.
https://decibel.ni.com/content/docs/DOC-4973
- After that the Style ID will show as a property on the Property Node
- Style ID 21012 is the rounded LED and the 21013 is the squared LED
Also even if you don't have the scripting enabled and you have a saved VI with the property node Style ID, you can copy and paste into your VI and that will still work 🙂