05-04-2023 02:31 AM
Hi guys,
I need now to the backward path:
from the UID to a control refnum.
How do I obtain it?
thanks
05-04-2023 02:47 AM
Hi Pinco,
you seem to have a faible for reviving (very) old threads: please stick with your thread and avoid double posts...
@PincoG wrote:
I need now to the backward path:
from the UID to a control refnum.
How do I obtain it?
Build a LUT (look-up table) containing all UIDs and their refnums.
Then you can look for your UID in question to get the corresponding refnum!
(In former LabVIEW versions we used Variant attributes, now you should use Maps instead...)
05-04-2023 09:00 AM
The following VI can give you a GObject reference from a UID:
[LabVIEW 20xx]\vi.lib\VIServer\UID to GObject Reference.vi
09-08-2023 05:15 AM
Hi everybody,
but changing Caption Tipstrip and Description, cheange them in a way the UI is redrawn?
In other words, can I use this method to change the aspect of my UI in running mode?
09-08-2023 05:31 AM - edited 09-08-2023 05:36 AM
@PincoG wrote:
Hi everybody,
but changing Caption Tipstrip and Description, cheange them in a way the UI is redrawn?
In other words, can I use this method to change the aspect of my UI in running mode?
You don't need scripting for that, it's all plain VI server stuff.
However, you can't dynamically create a caption. If the caption has never been created during edit time, the caption is not a reference, and you can't get one with VI server or scripting.
One would usually make labels unique and hidden and show the captions on the UI. Yu can than use the unique labels to lookup the desired caption and\or description:
You can use UIDs for this, but it isn't as convenient as labels:
EDIT: The tip strip it there too:
09-08-2023 08:02 AM
Yes,
i have done exactly as the second diagram you posted, but I cannot see any change in my UD. Why?
If I change the caption from a properti node of that control it works: tha caption changes immediatly on UI.
09-08-2023 08:30 AM
@Darren wrote:
The following VI can give you a GObject reference from a UID:
[LabVIEW 20xx]\vi.lib\VIServer\UID to GObject Reference.vi
This function only works in the development environment, not with the runtime.
09-08-2023 09:06 AM
Sorry,
was my error, the reference map was empty.
It's work perfectly.
Thanks to everybody
09-08-2023 01:53 PM
@raphschru wrote:
[LabVIEW 20xx]\vi.lib\VIServer\UID to GObject Reference.vi
This function only works in the development environment, not with the runtime.
Correct. If you need code that works in a built EXE, you'll need to create a map of UIDs. Which is pretty easy to do.
09-09-2023 05:15 AM