NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Save a file using .Net Assemblly ?

Solved!
Go to solution

Hello,

there are 100s of Assemblies in .Net , is there a assembly function to save a file  without opening the file-dialogue box?

Which Assembly to use ?

I want to avoid using a VI to do the same thing.

 

Best,

Akshay

0 Kudos
Message 1 of 8
(1,291 Views)

Hi aparab,

 

.NET isn't my thing but I think this should help?

 

Use Existing Object(NationalInstruments.TestStand.Interop.API.Engine).GetSequenceFileEx(System.String, Int32, NationalInstruments.TestStand.Interop.API.TypeConflictHandlerTypes).Save(System.String)

 

Regards

 

Steve

0 Kudos
Message 2 of 8
(1,290 Views)

Thanks Steve, 

well I donot explicitly wantto save the Sequnce File but a Result file, which can be a txt or XML.

 

& the Save member Function is not present in this class.

 

May be I am looking for a different class/member.

 

aparab_0-1633957113196.png

Best

Akshay

0 Kudos
Message 3 of 8
(1,276 Views)

You can configure TestStand to save Results files in a place of your choosing through the Configure->Results Processing menu.  Are you looking to implement that through .NET?  

0 Kudos
Message 4 of 8
(1,272 Views)

Hello Steve,

Yes, but I am not allowed to change those adapter settings because we have a standard  framework.

 

Hence I am trying to implement it in .Net.  .NET is elegant and powerfull.

 

For the worst case scenaio, I can always implement it with labview. 

 

Best,

Akshay

0 Kudos
Message 5 of 8
(1,267 Views)

I also tried using "System.IO.FileSystem(4.0.0.0)" but the Root Class is showing neither of the classes.

The same if I do in Visual Basic it works.

 

Does anyone of you are able to see the classes available in the "System.IO.FileSystem(4.0.0.0)"?

 

aparab_0-1633965616368.png

 

 

Best,

Akshay

0 Kudos
Message 6 of 8
(1,247 Views)
Solution
Accepted by topic author aparab

For .NET Framework APIs, you generally need to specify mscorlib instead, as follows:

 

dug9000_0-1633993013298.png

 

0 Kudos
Message 7 of 8
(1,236 Views)

thanks dug 

0 Kudos
Message 8 of 8
(1,217 Views)