From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Read *.seq file.

Solved!
Go to solution

Yes, but limits are variables from steps. So the lookup string looks differently.

 

Norbert

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

I don't quite understand this "lookup string". It's left emty when i get locals:

 

for (int i = 0; i < locals_num; i++)
 {
      PropertyObject prop_obj = seq.Locals.GetNthSubProperty("", i, 0);
      if (prop_obj.Parent.Name == "Locals")
       {
              seq_locals.Add(prop_obj.Name);
        }
 }

0 Kudos
Message 12 of 19
(1,359 Views)

@john7 wrote:

Sorry for disturbing. When i include NationalInstruments.TestStand.Interop.API.dll in my project and create  public EngineClass myEngine; I get an error -  Error 1 Interop type 'NationalInstruments.TestStand.Interop.API.EngineClass' cannot be embedded. Use the applicable interface instead. 


You need to select the reference to the assembly in Visual Studio and turn off interop embedding on the settings/properties for that reference. Interop embedding does not work in some cases. These assemblies are already in the GAC so there is not much benefit to embedding them.

 

-Doug

0 Kudos
Message 13 of 19
(1,356 Views)

@john7 wrote:

It's compiling in 3.5 .NET. Where can i get API.dll for 4 .NET?


The same assemblies should also work in .NET 4. What version of TestStand are you using? If you are using TestStand 2012 it uses .NET 4.0 by default. If you are using TestStand 2010 then you need an app.config file for it to use .NET 4. If you are using a version earlier than TestStand 2010, then it is not recommended to use .NET 4.0.

 

-Doug

0 Kudos
Message 14 of 19
(1,356 Views)

Hi Doug,

We use Test Stand 4.2.1.. This reference dosen't have interop embedding propety.

0 Kudos
Message 15 of 19
(1,344 Views)

@john7 wrote:

Hi Doug,

We use Test Stand 4.2.1.. This reference dosen't have interop embedding propety.


That's a visual studio setting. I thought you were trying to use the interops in visual studio. Why are you trying to use the interops directly in TestStand? I can't think of any reason why that would be necessary. Please describe in more detail exactly what you are trying to do.

 

-Doug

0 Kudos
Message 16 of 19
(1,331 Views)

I'm using NationalInstruments.TestStand.Interop.API.dll  in my C# application. The reason i use it to validate real step names and locals (and hopefully limits) against user edited ones in csv file. Right now it's successfully compiled in 3.5 .net version. In 4 .NET version i get an error as described above.

0 Kudos
Message 17 of 19
(1,324 Views)

@john7 wrote:

I'm using NationalInstruments.TestStand.Interop.API.dll  in my C# application. The reason i use it to validate real step names and locals (and hopefully limits) against user edited ones in csv file. Right now it's successfully compiled in 3.5 .net version. In 4 .NET version i get an error as described above.


1) Then what I said still applies. In Visual Studio, open the "references" node for the project. Right-click on the reference to that interop assembly and choose "Properties" from the context menu. Then, on the properties pane, set the embed setting to false.

 

2) Make sure the targetted framework is 3.5 or less for the project in the project settings or it will not work with TestStand 4.2.1. If you want to use the .NET 4 framework with TestStand, you should upgrade to TestStand 2010 or newer.

 

Hope this helps,

-Doug

0 Kudos
Message 18 of 19
(1,305 Views)

I see. Thanks a lot.

0 Kudos
Message 19 of 19
(1,301 Views)