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.
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.
02-18-2013 09:17 AM
Yes, but limits are variables from steps. So the lookup string looks differently.
Norbert
02-18-2013 09:38 AM
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);
}
}
02-18-2013 10:10 AM
@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
02-18-2013 10:12 AM
@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
02-18-2013 11:59 PM
Hi Doug,
We use Test Stand 4.2.1.. This reference dosen't have interop embedding propety.
02-19-2013 11:50 AM
@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
02-20-2013 02:15 AM
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.
02-20-2013 10:36 AM
@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
02-20-2013 10:54 AM
I see. Thanks a lot.