Teststand api to read sequences in a subsequence

I would like to read the subsequence names in a subsequence file using the API from C# 2008.
My top level sequence looks like this:
MainSequence
GroupSequence1
GroupSequence2
GroupSequence3
In the subsequence GroupSequence(n) I have the following sequences:
MainSequence
TestSequence1
TestSequence2
TestSequence3
I am able to get the top-level sequence's subsequence names by:
public void ReadSequenceNames(SequenceContext seqContext){
     for (int i = 0; i < seqContext.SequenceFile.NumSequences; i++)     {
        string subSequenceName = thisSeqContext.SequenceFile.GetSequence(i).Name;    }
This code returns "MainSequence", "GroupSequence1", "GroupSequence2", "GroupSequence3".
Now I want to find the names of the subsequences in "GroupSequence1", "GroupSequence2", "GroupSequence3", etc.
I would expect to find "MainSequence", "TestSequence1", "TestSequence2", "TestSequence3", etc. but my attempts to move down in the sequence hierarchy haven't worked.

Hi,
These sub-sequence  dont reside in the Top level sequence file, therefore, you will have to work your way through the sequences and at every SequenceCall get the path to the sequence file so that you can then load the sequence file to obtain the sequences.
There are a number of API calls you could use but it will depends on how this rountine is run.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • Visual Studio TestStand API runtime enable/disable XML reporting file creation

    I am looking for a Visual Studio C# solution to selectively disable creation of the report generation XML file using the TestStand API.
    These XML files are useful for active troubleshooting for technicians, but wind up cluttering important directories with useless information most of the time.
    I am aware that the XML file creation can be disabled through the TestStand Sequence Editor menu item Configure | Result Processing | Output Name Report | Enabled unchecked option.
    This is helpful, but:
    1. I have not found a way to check-uncheck this feature at runtime.
    2. I do not believe that this would be an effective solution for my instal-less Base Deployment Paradigm.
    Any help or ideas would be appreciated!
    Solved!
    Go to Solution.

    Thank you for the quick and concise response James_Grey!
    This is useful, complete, and implementable but not exactly what I was hoping for.
    I was hoping to be able to enable/disable the XML file creation for the currently executing instance of the engine prior to sequence start.
    I would rather not disable reporting through a configuration file that would effectively disable it for all uses of TestStand until it was re-enabled again.
    Are my expectations unrealistic?
    Does anyone have any idea how creation of the XML file can be enabled/disabled for an active instance of the engine prior to sequence start through the API without altering the file based configuration of TestStand?
    I have seen some postings around 2008 that indicate this can be done, but I was unsuccessful implementing those solutions in TestStand 2013.

  • TestStand API: Set relative path

    Dear NI community!
    Could someone help, please, with the following - is there is some option to set file path to code modules, inside test sequence, to have relative, but not absolute path? I add programmatically code modules to sequence steps, but currently they have absolute path. Is it possible to change it to relative with TestStand API?
    Thanks in advance.
    Solved!
    Go to Solution.

    I was wrong. It's possible to manually cut path to file (according to Search Directories of TestStand). Then code modules will be added with relative pathes. But one should be careful - path should be cut correctly.
    For example, I have full path
    E:\Development\source code\supplementary\TestVIs\Code Modules\Service\Print.vi
    My Search Directory is 
    E:\Development\source code\supplementary\TestVIs\
    So, I need to cut like this:
    Code Modules\Service\Print.vi
    and without slash at the beginning!
    Then it will be OK.

  • TestStand API in C#

    Hi,
    we develop a software in C# which uses the TestStand API.
    we note that TestStand API allocates memory at the first execution of a TestStand sequence
    All the memory of this first execution is not deallocate at the end.
    why ?
    Is it a problem with Active X technology ?
    Is it a conserved memory for the next execution ?
    Is it possible to not have this comportment ?
    For information, we have deactivated the generation of the TestStand report.
    Thanks for the answers
    Best regards

    There is memory allocated when an execution is run for many different reasons. Please be more specific as to which memory you are referring. Choose one of the following (or add your own if I have forgotten one).
    1) Memory used by result collection (to store results under Locals.ResultList while an execution is running). These are typically freed once the process model is done processing them typically for report generation or database logging. By default the process model processes them between runs of the mainsequence on the UUT. These results are also freed when the execution completes (i.e. stops running). If you are not using a process model or do not need results for specific steps or sequences you can disable result collection on a per-step, per-sequence, or global basis.
    2) Memory used to keep the sequences and executions themselves in memory. These datastructures stay in memory as long as you have a reference to them. One additional twist with .NET is that you might not think you have a reference to them, but you really still do because .NET hasn't gotten around to garbage collecting the references yet. You can force garbage collection as follows with the following code:
            public static void DoSynchronousGCForCOMObjectDestruction()
                // To make sure activex refs are synchronously released
                // we need to call GC.Collect() and GC.WaitForPendingFinalizers()
                // at least twice, according to the following document:
                // http://msdn.microsoft.com/en-us/library/aa679807%28v=office.11%29.aspx
                // The reason we have to do it twice is that the the first call
                // might just sweep the objects into generation 2 rather than collecting
                // them immediately.
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                GC.WaitForPendingFinalizers();
    3) Memory used by code modules being loaded. This memory is freed when the step settings on your code modules say to unload your modules, but the behavior is somewhat different depending on the adapter. Some adapters can unload code modules on a per-code module basis, but the .NET adapter can only unload code modules when all code modules and .NET objects created by the .NET adapter are no longer supposed to be loaded or referenced. That is because in .NET the only way to unload code modules is to unload the appdomain containing them. TestStand uses a single appdomain for the .NET adapter and unload that appdomain when all .NET code modules referenced by the adapter are unloaded and all .NET references gotten from those code modules into TestStand are no longer in scope.
    Hope this helps explain things.
    -Doug

  • TestStand API terminate all notification

    I've developed a LabWindows based user interface using the TestStand UI controls and the TestStand API. I have a sequence file that has several cleanup steps, some of which take a while to finish. One function of the user interface is an Emergency Stop button. When this is pressed, an Engine.TerminateAll is issued via the API. The test fixture has 8 sockets which are using the Batch Model TestUUts entry point. Is there any easy way via callback or other means of knowing when all the terminations have completed. I would like to display a popup telling the operator to wait while the cleanup steps are being carried out. I also want to disable the START button and reenable it when the terminations are complete.
    I am launching the execution with TS_EngineNewExecution and I can get the id. I tried to wait until I saw this execution end with the ApplicationMgr  EndExecution event or the Execution VIew Manager EndExecution event but I saw a bunch of exection id's except the one that I was looking for. It may be my fault but I wanted to ask and see what is the best approach for what I am trying to accomplish.
    John

    Hey John,
    Your method will work, and your assumptions are partially
    correct.  If you look in the Batch Process Model, inside of the
    Cleanup Step Group of Test UUTs there are steps that tell all
    TestSocket executions to stop.  There is also a wait step that
    forces the Process Model execution to wait until all of the TestSocket
    executions have terminated. There are going to be multiple EndExecution
    events because it is going to occur for each execution that finishes
    whether it is the Process Model execution or one of the TestSocket
    executions. However, the Process Model will always be after all of the
    TestSocket executions have completed. 
    Another thing to keep in mind is that this is only happening because it
    is built into the process model.  Normally if you spawn off a new
    execution it is separate from your original execution, and the new
    execution would not terminate by calling the terminate method on your
    original execution.  You would have to either do a terminate on
    each execution or use the terminate all method of the application
    manager. Hope this helps to clear things up a little.
    Pat P.
    Software Engineer
    National Instruments

  • Teststand api Creating/deleting Users

    Hi,
    I am using Teststand API with Labwindows and i have a problem with creating/deleting Users.
    In fact, to explain easily my problem when you use the full-featured Teststand  with the "CreateDeleteUsers.seq" sequence and create a user, then close the full-featured Teststand, you loose your new users in the previous opening.
    Whereas, with the Teststand 4.0, with the same "CreateDeleteUsers.seq", when you close, it propose to save the changed file "UserManagement" (Users.ini) and everything's fine...
    And as i am using a Labwindows project to login/logout to teststand, i am using TS_... functions i can't find a way to save or to have this save popup to keep my users.
    I hope that i am clear, and that someone will be able to help me ! 

    Hello,
    As you could see in the following KB: How Can I Edit and Save Changes for the Current User? you have to get the users file as a PropertyObjectFile as it's done in the CreateDeleteUsers sequence, and then use two methods, IncChangeCount() wich is also already done in the example sequence, and the SaveFileIfModified().
    See attached file below for the example sequence changed with the file saving.
    Regards,
    Olivier L. | Certified LabVIEW Developer
    Attachments:
    CreateDeleteUsersAndSave.seq ‏11 KB

  • Load a VI (including TestStand API) in TestStand

    He,
    I'd like to load a VI in TestStand without LabVIEW.
    LabVIEW Version 8.5
    TestStand Version 4.0
    The PC with TestStand just have LabVIEW Runtime Engine 8.5, and the VI is used to import data in station globals; Also, This VI calls TestStand API and TestStand Engine.
    On a PC with LabVIEW and TestStand, all is OK.
    But, on a PC with Runtime only, even if I configure Adapters in TestStand and Select LabVIEW Run time 8.5, an error message is displayed (unable to load VI ... )
    I have tested with a simple VI (dialog box), all is ok;
    But with VIs thaht called API TestSTand, error is displayed
    Do you have an idea ?
    Thank you for your responses
    Solved!
    Go to Solution.

    Yes, I understand that you use TestStand in development system and the VIs are in an llb there. What I ASKED was where you placed the TestStand VIs on the runtime only pc. It sounds like you did not place them anywhere. If you didn't, how do you think the top level VI is going to work? You don't think that these VIs are included in the runtime engine do you? They are not. Only the LabVIEW primatives are in the runtime engine.
    You should really consider using the deployment tool.

  • How do you get a handle to a TestStand API SequenceCallModule Object?

    I am trying to programatically specify the SequenceName for a sub sequence, created using the TestStand API called from LabView.  SequenceName is a property of the SequenceCallModule object but I cant see how to get the object handle.
    Can anyone help?
    Regards
    Steve
    There are 10 types of people in the world that understand binary, those that do and those that don't.

    Hi,
      you can actually do this. I was speaking to Steve yesterday on this :
    starting with the handle to the appropriate step (I've done it in the attached sequence file in TS, but should translate nicely to LV)
    so I use the sequence to get the step by name
    I can then get the step.module
    then using the TESTAND ADAPTER API (and not the Teststand API)
    I can use the module returned above with the SequenceCallModule class from the TestStand AdapterAPI then. (you have to know ahead of time what the appropriate module / adapter type is otherwise it will have problems)
    Hope that helps
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer
    Attachments:
    3_0 using adapter specific sequencecallmodule.seq ‏39 KB

  • Teststand API in LABVIEW

    Hello Friends,
    In the sequence editor , i am able to get the TestStand API  RunState.Step.Module.AsLabVIEWModule.RemoteHost = ""
    But i am not able to get the same Teststand API properties in Labview with sequence Context. Herewith in attached the image for your ref.
    Anyone knows how i can get the above teststand API in LABVIEW.
    Thanks
    Prithivi
    Attachments:
    Labview Teststand API properites1.JPG ‏51 KB

    Hi Prithivi,
    you have to cast the Module Reference to LabVIEWModule Type before you can use it. Following document will be useful to you:
    How Can I Programmatically Access Information about a Code Module that a Step Executes (e.g. Name, Path)?
    http://digital.ni.com/public.nsf/allkb/ADC6909C20E27D4886256E94005424E3?OpenDocument
    Regards
    MY
    Attachments:
    LVModule.JPG ‏17 KB

  • Attaching User ComboBox to TestStand API

    I am using a custom interface that gives my application an Office 2003 look incliding the dockable panels and toolbars, I would like to use the ComboBox controls that I normally use rather than the NI ComboBox that comes with TestStand, How do I connect those custom Combo boxes to the TestStand API?

    There is no simply way to connect non-TestStand UI control to a manager control such that it behaves the same way as a connected TestStand UI control. Instead, you must implement the desired behavior in the usual way you program your controls.
    This means you have to use the methods and events that your combo box offers to add and remove items and to respond to user selections.
    To obtain the data to populate the combobox or to perform an action in response to a user selection, you might need to call the TestStand API. Which methods you call would of course depend on what you are showing in the combo box.

  • Java API to read the Encrypted Values from Windows Registry settings

    Is there any Java API to read the Encrypted Values from Windows Registry settings ?
    My Java Application invokes a 3rd party Tool that writes the key/value to windows registry settings under : “HKLM\Software\<3rdparty>\dataValue”.
    This entry is in BINARY and encrypted with 3DES, using crypto API from Microsoft.
    3rd party software to encrypt the data stored in registry it
    either uses C++ code: and uses the call “CryptProtectData” and “CryptUnProtectData” or
    If it is a .NET (C#) it uses the call “Protect” or “UnProtect” from class “ProtectData” of WinCrypt.h from the library “Crypt32.lib.
    Note: The data is encrypted using auto-generated machinekey and there is no public key shared to decrypt the Encrypted data.
    Since the data is encrypted using auto-generated machinekey the same can be decrypted from a .Net / C++ application using CryptUnprotectData or UnProtect() API of WinCrypt.h from the library “Crypt32.lib.
    To know more about Auto-Generated MachineKey in Windows refer the links below
    http://aspnetresources.com/tools/machineKey
    http://msdn.microsoft.com/en-us/library/ms998288.aspx
    I need to find a way in Java to find the equivalent API to decrypt (CryptUnprotectData) and Microsoft will automatically use the correct key.
    But i couldn't find any informato related to Java APIs to enrypt or decrypt data using auto-generated machinekey.
    Is there a way to read the encrypted data from Windows regsitry settings that is encrypted using the Auto-Generated Machine Key ?
    Kindly let me know if Java provides any such API or mechanism for this.

    If the symmetric key is "auto-generated" and is not being stored anywhere on the machine, it implies that the key is being regenerated based on known values on the machine. This is the same principle in generating 3DES keys using PBE (password-based-encryption). I would review the documentation on the C# side, figure out the algorithm or "seed" values being used by the algorithm, and then attempt to use the JCE to derive the 3DES key using PBE; you will need to provide the known values as parameters to the PBE key-generation function in JCE. Once derived, it can be used to decrypt the ciphertext from the Regiistry in exactly the same way as the CAPI/CNG framework.
    An alternate way for Java to use this key, is to write a JNI library that will call the native Windows code to do the decryption; then the Java program does not need to know details about the key.
    That said, there is a risk that if your code can derive the key based on known seeds, then so can an attacker. I don't know what your applicatiion is doing, but if this is anything related to compliance for some data-security regulation like PCI-DSS, then you will fail the audit (for being unable to prove you have adequate controls on the symmetric key) if a knowledgable QSA probes this design.
    Arshad Noor
    StrongAuth, Inc.

  • Api for reading .cfg files

    Hello everyone,
    Once I saw an api for reading typical .cfg files, in which ## are comments, [xx] are labels... Now I need to use it but I don't remember the api any more.
    Can somebody tell me which class do I have to use?
    Thanks a lot

    Now I need
    to use it but I don't remember the api any more.http://java.sun.com/docs/
    There is nothing that I'm aware of in the api that has the same functionality as MFC GetPrivateProfileString(...)
    You could use a properties files like most other people, otherwise you are going to have to implement it yourself.

  • How to read sequence numbers from RTP packets

    hi everyone.
    i want to know how to read sequence numbers of RTP packets. I will need that to reconstruct my stream from packet losses.
    URGENT Help needed!!

    The StreamTokenizer parses all numbers into only one type of value, a double. If you know that all the numeric values in the file will be integers, you could just cast the nval double field to an int and the toString() method will format it correctly.
    If you want to have different tokens and value types for different kinds of numbers, you will have to sub-class StreamTokenizer and add these capabilities yourself. You can add the type constant TT_INT, and provide an int field named ival. The toString() method would then format the value in the correct manner.
    If, on the other hand, you are actually looking for the exact text that was parsed, you could add code that collects the characters as they are parsed for any token type into the sval field in the nextToken() method, just like it already does when the token is a TT_WORD. In this manner sval is always valid for any token type.
    I hope you find this of some help.

  • Java API for reading Excel Files.

    Hi,
    Can you please suggest me any api for reading excel files.
    Right now i am using jxl.jar for this purpose but i am searching for an open source java api better than this.
    Whether POI gives better than this ?
    Thanks,
    Amit Shah.

    Can you please suggest me any api for reading excel
    files.
    Right now i am using jxl.jar for this purpose
    but i am searching for an open source java api better
    than this.
    Whether POI gives better than this ?i don't know about jxl but poi has several features which an excel can contain and it has been vastly improved in the past few versions.

  • How do you assign profile in a format plugin read sequence

    I have a format plugin that will read various image formats.  I know what the source colorspace or profile  (i.e. ProPhoto RGB, sRGB, AdobeRGB, whatever) is.  I haven't figured out how to do the equivalent to Assign Profile from with my Read sequence in my Format Plugin.
    Surely there is a way to do this.  ACR does it.
    Any clues will be greatly appreciated!

    Well, it appears that you just fill in the iCCprofileData/iCCprofileSize fields with an ICC profile.
    You can read the ICC profile for a filter plugin and you can specify an ICC profile for a format plugin read sequence.

Maybe you are looking for

  • ITunes STILL won't open on Windows...help please?

    So, I am pretty frustrated. I downloaded the lastest version of iTunes 7.2 a few days ago, and after installing it, I kept getting Symptom B as mentioned in the announcement above, "If iTunes 7.2 won't open or stay open on Windows..." posted by Roy B

  • Need help connecting java-program to Clarion-software/database

    I have made a simple java-program which monitors control-lines in a computers com-port. Now I need to pass this information to Clarion-based software. I am currently writing the changes in to a file from which the clarion software will read the chang

  • Announcement: Oracle BI, Warehousing and Analytics Summit, Dec. 2-3 2008

    Oracle BIWA Summit 2008, December 2-3, 2008 (www.oraclebiwa.org) Oracle World Headquarters, Redwood Shores, CA IOUG Business Intelligence, Warehousing and Analytics SIG ”Transforming Data To Information For Competitive Advantage” Oracle BIWA Summit 2

  • How to get former messages after synch my Blackberry with Office 365 ?

    Hello, I synchronised my Blackberry with Office 365, using the Blackberry Business Cloud Services interface. The synchronization worked perfectly, but I'd like to have on my smartphone messages dated before the day of the synchronization. Is there a

  • Computer will not load OSX Just Vista

    I installed vista on my imac and now it will not start OSX. The bootcamp software should ask whitch one I will like to start up, but for some reason it just starts vista only and does not give me a choice. HELP!