LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with COM API for Interfacing VI Buttons and Accessing Nested Controls in LabVIEW

Hello LabVIEW Community,

 

I am currently working on automating interactions with a LabVIEW VI using the COM API (ActiveX) and facing a couple of challenges that I hope to get some insights on:

  1. Interfacing with Nested Controls:
    I’m trying to manipulate controls within a VI, specifically buttons that are nested inside other controls or clusters. I can easily interact with simple controls, but I'm having trouble accessing controls that are part of a cluster or array and also say the browse button as part of the file path control. How can I programmatically access and manipulate these nested controls using the COM API? Is there a particular method or property I should be using?

  2. Changes via COM API Displayed but Not recorded on the Front Panel even when the VI is running:
    I’ve noticed that when I make changes to control values via the COM API, the modifications are immediately visible on the VI’s front panel but are not recorded as having been performed. This behavior is particularly confusing because I would expect the VI to update automatically. Do I need to implement additional functionality to continuously update the front panel, or is there a specific trigger or method to ensure the front panel reflects the changes made by the API in real-time?

Any suggestions, documentation references, or examples would be greatly appreciated!

Looking forward to your insights!

Thanks in advance!

 

FYI: I am using python and below is the VI and how I interact with it in Python. if you need the VI or it's string, please let me know.

murogivegmailcom_0-1725597593048.png

 

Automotive Simulation & Validation Engineer | AI Enthusiast | Nature Explorer
"Driven by innovation, inspired by technology, and grounded in nature."
0 Kudos
Message 1 of 5
(697 Views)

Change your user name so it isn't your email adress!

 

You'll get a lot of spam!

0 Kudos
Message 2 of 5
(657 Views)

As for the question, I'd suggest to first get this working from LabVIEW using VI Server.

 

Then I would take another step, using the COM interface from LabVIEW. But that might not help you.

 

In VI Server, you'd get references to nested controls of a cluster with the "All Controls" property.

 

An array is much trickier. You can use the "Element" to get a reference to the element. Not a element. You cannot change properties of individual array elements. Not manually, not with VI Server, not though the COM interface. You can modify individual array element values, by reading the array value, changing an individual value in the array, and writing the array as a value to the referenced control.

 

I don't know why controls aren't updating. Defer Panel updates turns this off and on, but if you don't turn it on, it should update.

Message 3 of 5
(655 Views)

Unfortunately, I tried changing My Alias in my NI Account and the change never reflected here. Thank you so much for the heads up

 

Automotive Simulation & Validation Engineer | AI Enthusiast | Nature Explorer
"Driven by innovation, inspired by technology, and grounded in nature."
Message 4 of 5
(644 Views)

@RMutegeki wrote:

Unfortunately, I tried changing My Alias in my NI Account and the change never reflected here. Thank you so much for the heads up

 


It worked:

wiebeCARYA_0-1725615466661.png

0 Kudos
Message 5 of 5
(638 Views)