LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I apply properties to a control refnum from another VI and whose type I know?

Solved!
Go to solution

Hi,

 

I have programmatically retrieved the Control refnum of a Table running on a separate VI. I search for its name and when match ocurrs I would like to use its control refnum to change som cell values in it by either the Invoke node or Property node. Nevertheless even though I know it is a Table I am not allowed to wire the control refnum to a property node with "Active cell", "BG color" et.c. I am not either allowed to wire it to an Invoke node with the method "Set Cell Value".

 

Is there a work around for this?

 

 

 

0 Kudos
Message 1 of 10
(3,740 Views)
Solution
Accepted by RealBjörkis

You have to use the "to more specific class" function in the application control palette.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 10
(3,737 Views)

hi,

Afer matching that control refnum convert that refnum to table refnum of what ever you want as shown in fig after that you will get that options 

untitled.JPG

ihope this will help you

Regards,
Santhosh M
Message 3 of 10
(3,731 Views)

Thanks Norbert.

 

Your solution helped.

Santhosh I will try out your solution too. Thanks.

 

 

0 Kudos
Message 4 of 10
(3,726 Views)

Oops. I thought I could choose two accepted solutions. If a had to choose now afterwards I would chose Norberts solutuions since it was posted first. Sorry Norbert, I made a misstake.

0 Kudos
Message 5 of 10
(3,723 Views)

Well, i assume that Santhosh solution works too (i hope he tested it before 😉 ). So no mistake here. Still, if you like, you can take the "solution" flag back from a post and redistribute it....

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 10
(3,718 Views)

Ok, I know now how to unmark solutions.

Sorry Santhosh, what is fair is fair.

0 Kudos
Message 7 of 10
(3,701 Views)
You can provide Kudos for good answers as well 🙂
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 10
(3,696 Views)

Aha, is that what it means.

Ok Santhosh received a Kudos then.

0 Kudos
Message 9 of 10
(3,685 Views)
You should NOT use the type cast method. It works because of the way references are implemented, but it's a dangerous option because it allows you to convert any reference to any other reference, even with the potential to crash LabVIEW. The TMSC primitive is the one you should use, and it will return an error at run-time if the reference does not actually point to a control of that class.

___________________
Try to take over the world!
Message 10 of 10
(3,681 Views)