NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

A Full Featured TestStand Operator Interface as a .NET child form

When attempting to create a full featured NI TestStand Operator interface (from NI example OI code) in a C# .NET child window, I get the exceptions below.
I create the teststand app, execution, and sequence view manager on the MDI parent form and pass their instances to the testand child form when I create its instance.
Other than commenting out the splash and about box and making a new constructor, the NI example code is left intact.
 
Unable to load test environment adapter 'cppAdp.dll'
 
Could not load tes adapter DLL 'C:\Program Files\National Instruments\TestStand 3.5\Bin\cppAdp.dll'
 
Error code: -17004, Could not load DLL or Library.
 
Unable to load test environment adapter DotNetAdp.dll'
 
Could not load tes adapter DLL 'C:\Program Files\National Instruments\TestStand 3.5\Bin\DotNetAdp.dll'
 
Error code: -17004, Could not load DLL or Library.
 
 
Unable to load test environment adapter flxCVIAdp.dll'
 
Could not load tes adapter DLL 'C:\Program Files\National Instruments\TestStand 3.5\Bin\flxCVIAdp.dll'
 
Error code: -17004, Could not load DLL or Library.
 
When using the simple OI code in a similar fashion, I am able to get it the child form to open but some items do not display properly.
 
Formless in Greeneville,
 
Please help
 
0 Kudos
Message 1 of 5
(3,558 Views)
Hi Millersoft,
 
Do you happen to have multiple versions of TestStand installed on your machine?  If so, have you checked the active version of TestStand in the Version Selector, found at C:\Program Files\National Instruments\Shared\TestStand Version Selector?  The second problem you describe, items being there but not showing up properly, will occur often when you're opening an OI different from the currently loaded version.  I could see this also causing the error messages that you are getting as well.  Check this out and let me know if the version selector and the OI are both the same (I assume from the error messages that you are trying to use 3.5).  I look forward to your reply.  Thanks and have a good one.
Message 2 of 5
(3,537 Views)

Thanks for the reply,

 

I have both 3.5 and 3.1 on my machine and activated the 3.5 verion after I installed it. I was getting the non-display issue on the simple child form even on 3.1. Once I installed 3.5, I wanted to make an attempt at getting a full featured child form working also.

 

Since I emailed this item, I tried some stuff on the full featured version that made the exceptions go away but make it seem like it could be a threading issue. I moved the initialization code of the NI example for the full featured OI from the OnLoad handler to immediately after the child form constructor's call to InitializeComponent. In the OnLoad handler, I left the axApplicationMgr.Start() call. The exceptions went away but some items were not initialized or displayed much like my previous experience with the simple OI.

 

Thanks for your time.

 

0 Kudos
Message 3 of 5
(3,531 Views)

Millersoft,

Although it is written for TestStand 3.0 and not 3.5, there is an example of using Child Windows in the OI which can be found here:

TestStand 3.0 Multiwindow Operator Interface Example

Take a look at this example and see if this clears some things up for you and whether the example works the way it should.  Let me know the results.  Thanks and have a good one.
Message 4 of 5
(3,511 Views)

Wow,

 

I would have never figured that out! I certainly over-simplified my approach. Even though I haven't implemented all that the attached example shows, I trust that it will work for me.

I'm not sure why that example never showed up in my searches but thanks loads! Believe it or not I was considering moving the TS operator interface into a .NET Remote app to isolate the issues I was having!

You saved me a bunch of work!

I have to admit using TS in .NET still makes me extremely nervous! Hopefully, TS 4.0 will be a .NET app. We' ll see.

 

Thanks Again!

0 Kudos
Message 5 of 5
(3,500 Views)