LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing with Measurement/Visual Studio form controls from LabView.

I am trying to call a program written in Measurement/Visual Studio from LabView so I can integrate it into my LabView test software.  Using a .NET constructor in LabView and wiring to an invoke node I am able to access the public methods of the form.  If I use a property node I can see parameters such as the background color.  However what I am trying to find are the member objects of the form such as a NumericEdit control on the form.  Basically I want to use LabView to programmatically change the values on the Measurement Studio GUI as if someone was typing them in by hand.  Is there a way to do this?

0 Kudos
Message 1 of 5
(2,703 Views)

I think you have some mixup here.

 

.NET is, regarding LabVIEW, primarily a software interface. .NET provides two ways how LabVIEW can hook up to interface with .NET components:

- Link: You use this interface to control external components programmatically. Usually, those components run in the background as "service". Display is an option, but normally uses a dedicated window for this. An example would be "remote control" of Microsoft Excel/Word to create files with specific data/layout from LabVIEW.

- Embedd: This interface enables you to use .NET components within your LabVIEW front panel. An example for this would be to add a .NET Windows.Forms.Tree control to your LabVIEW front panel (User Interface) to merge it into the rest of your LabVIEW application.

 

As i understand your last question, you are looking for a way to remote control a Visual Studio application. If my understanding is correct, i expect this to be a rather difficult task as i am unaware of any API Visual Studio supplies to remote control the whole development environment.

 

Maybe an easier way is to work directly on the c#-files by adding textelements for the designer.

 

Norbert

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

I agree with Norbert.  You might check out Microsoft's Developer's Netowork at msdn.com to see if they have any documentation useful for controlling properties in Visual Studio.

 

-Jim B

-Jim B
Applications Engineer, National Instruments
CLD, CTD
0 Kudos
Message 3 of 5
(2,650 Views)

Thanks for the responses.  I should clarify that I have no interest in using the Visual Studio GUI interface at all.  I just want to access the methods and member variables that were created for this object.  I'm not familiar with VB but it seems to me that the Windows form itself is a class which is constructed using objects (i.e. controls) of other classes and I just want to access those other objects.  I though I would be able to see a hierarchy that I could drill down into to change control values. Thanks.

0 Kudos
Message 4 of 5
(2,645 Views)

Using the .NET interface in LV, you can use any public accessable property and method of an object in your .NET assembly.

That being said, i am now confused where your issue originates.

 

I think it is the best that you attach your current approach in this thread and explain, what you want to achieve.

 

Norbert

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