Programatically select a step in a sequence in a sequence file loaded in TestStand sequence editor using C#

Hi all,
I have written C# code to load a sequence file dynamically in TestStand Sequence editor. The code is as follows...
myEngine.PostUIMessage(mySequenceContext.Execution, mySequenceContext.Thread, UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true );
The code is working fine and I could view the Sequence file opened in TestStand Sequence editor.
Now, I wish to select one sequence in the opened sequence file to get the details of  the sequence programatically. In other words, I want to simulate a mouse click to a sequence and view the steps associated with that sequence.
Can anybody give some clues...
Thanks in advance.

Hi,
Also I am getting error like "Index out of range. Source:  TSUISUPP.SelectedSteps   at NationalInstruments.TestStand.Interop.UI.Support.SelectedSteps.AddStep(Step val)". Error code: "-17500; Operation Failed." My code is like
mySequenceFile = myEngine.GetSequenceFileEx(@"D:\dynamic loaded sequence.seq", 0, TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);
mySequence = mySequenceFile.GetSequenceByName("First");
Step myStep = mySequence.GetStep(2, StepGroups.StepGroup_Main);
SequenceContext mySequenceContext = mySequenceFile.NewEditContext();
mySequenceContext .AsPropertyObject();
myEngine.PostUIMessage(mySequenceContext .Execution, mySequenceContext .Thread, UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true);
ApplicationMgr applicationMgr = (ApplicationMgr)myEngine.GetInternalOption(InternalOptions.InternalOption_ApplicationManager);
SequenceFileViewMgr sequenceFileViewMgr = (SequenceFileViewMgr)applicationMgr.GetSequenceFileViewMgr(mySequenceFile);
sequenceFileViewMgr.SelectedSequences.Clear();
sequenceFileViewMgr.SelectedSequences.AddSequence(mySequence);
sequenceFileViewMgr.SelectedSteps.AddStep(myStep);
I am sure that my Sequence selected in the Sequence file loaded has more than 2 steps. Please help me in solving this problem and that in the previous post.
Thanks,
Biju kuttan

Similar Messages

  • Differences between TestExec and Sequence Editor for LabView7.1 runtime?

    Hello,
    My sequence runs perfectly in the Sequence Editor using the LabVIEW 7.1 runtime engine adapter and the dev adapter.
    However when I try it using full featured TestExec.exe (the supplied LabVIEW user interface) it gives the common
    'VI is not executable' error for one of the steps if I have the runtime adapter chosen.
    It works when the dev adapter is selected.
    The step that gives the error has no broken arrow - and as I mentioned,
    it works in the Sequence Editor with the same runtime engine adapter.
    The search paths are identical.
    Is there anything special I should know about TestExec.exe?
    I am at a loss on this one - any ideas?
    TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009

    Hi believer,
    I think you have to rebuild the testexec.exe with labview 7.1.
    Copy the NI folders to the User folder. You will find all the source VI's and the build file for the application builder as part of the file set.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How do I process user command line arguments inside of the Sequence Editor?

    Using TestStand 4.0, how would I go about storing "extra" command line arguments processed from the /runentrypoint command in the Sequence Editor specifically?

    djdewitt -
    TestStand 4.2 does not have this feature; however, we do have an internal issue (#163169) to track this request. You can actually get the commandline passed to the TestStand Sequence Editor using the below psuedo code in a sequence; however, currently the TestStand Sequence Editor displays a prompt when it does not recognize a custom token on the command-line and there is no way to suppress this.
    Locals.AppMgrRef = RunState.Engine.GetInternalOption(InternalOption_ApplicationManager);
    Locals.CommandsRef = Locals.AppMgrRef.CommandLineArguments;
    Locals.CountNum = Locals.CommandRef.Count;
    For i=0 to Locals.CountNum - 1
        Locals.CommandString = Locals.CommandRef.Item(i);
    End
    One suggestion is to use a batch file to write the commands to a dedicated text file and then launch the sequence editor. You can then use a sequence in the sequence editor to read from the file.
    Lastly, I just tried something and I do not necessarily recommend this, but I noticed that the Sequence Editor does not prompt when using the /goto token, so if I use the below command-line, it seems that no prompt appears, the goto command does nothing, and the psuedo code accesses the command-line tokens: 
    "C:\PathToApp\SeqEdit.exe" /goto "location tokens that do nothing" /run MainSequence "C:\PathToSequenceFile\GetCommandLineArgs.seq"
    Keep in mind that NI does not necessarily support this but it does seem to work for now.
    Scott Richardson
    National Instruments

  • Is there a way to roll up steps in a sequence file

    I have some pretty long sequece files that have many nested steps...Is there a way that I can "roll-up" these steps in my sequence?  I am having trouble keeping my "Ends" straight sometimes and I think it would be easier to see them rolled up and then expand the section I need to work on.
    Anybody figured out a way to do this?
    Matt

    You can expand the Setup, Main and Cleanup Groups but you can do it with a selection of Step.
    The only way would be to group your steps into a Sequence and have your top level call a group of SequenceCalls.
    Regards
    RayF
    Regards
    Ray Farmer

  • Programati​cally Assigning Step Type Properties

    I have developed several COM instrument drivers in Visual Basic 6.0 which I can call from TestStand using the ActiveX/COM adapter. However, I would like to be able to create a custom step type for each of these ActiveX servers. Each server provides several creatable classes and a number of interfaces. Ideally I'd like to create a custom step type that references the GUID of my server but have the ability to programatically assign the step properties such as Interface ID and CoClass ID to use the classes and interfaces of my server that I want need to access.
    I have noticed that it is possible to create a step type (IEngine.NewStepType method) and set the Automation Adpater. Then I can programatically access its hidden properties (e.g.TS.SData.Call.CoClass). However, I am unsure of how to save and/or access this newly created step type. Where is it stored and how can I insert steps using of the new step type?
    I have attached a sequence I've been working on. This has dependencies on a Station global and a server unique to my system but illustrates what I've been trying to do. Do you have any advice of what I need to do next or have any examples available where this sort of thing has been done in the past.
    Thanks.

    Hi David,
    Here is some steps for saving your Step types.
    You will need to create a type palette Ini file to hold your step types.
    Get a PropertyObjectFile reference by calling Engine.NewPropertyObjectFile(FileType_TypePaletteF​ile).
    Set the path of the ini file with PropertyObjectFile(Path).
    Get a TypeUserList reference by calling PropertyObjectFile.TypeUsageList().
    Get a count of the number of Types in the TypeUsageList by calling TypeUsageList.NumTypes().
    This point create your Step types (as you have done). You will need a PropertyObject reference to your steptypes for use with the TypeUsageList.InsertType().
    Using each steptype PorpertyObject reference.
    Insert the Type into the TypeUsageList by calling TypeUsageList.InsertType(step type propertyobject ref, index (which will be your count), typeCategoryParam = TypeCategory_StepType)
    Call the PropertyObjectFile.IncChangeCount() to indicate file changed.
    Increment the count and repeat Insert for each of your step types.
    save the ini file PropertyObjectFile.SaveFileIfModified(prompt = TRUE).
    Tidy up by releasing references etc.
    I know this works for TestStand 2.0.1f1 and hopefully it will work for 3.1. Unfortunately I haven't got 3.x installed on a PC to try it.
    Hope this gets you started.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Use the same code module for several steps in the sequence

    Hello All,
      I have been trying to set up a sequence that uses the same code module for all of the steps in the sequence, but am having trouble referring back to it when I need to send it commands.  I have gotten as far as calling the VI in a new thread so that it can be run asynchronously.  I can run the simple sequence and it will indeed open the VI, and move on to the next step.  When I close the VI manually from the front panel, the sequence in TestStand completes, as expected.  So it appears that I have that much working. 
      My question is how to call the separate thread from the main sequence or other sub sequences when I need to edit the parameters.  If I insert an Action step, I am required to select a VI file, but from what I can tell, it opens a different instance of the file, and does not provide an interface with the other instance running asycronously.  My next guess was to use a Statement step, but I was not able to figure out how to configure the lookup string to call the VI parameters.  Beyond that, I'm not sure how to proceed.  Please advise.   
      My intention is to start the code module VI (asynchronously), run several different subsequences within the main sequence that call that same VI and edit it's parameters, close everything and report on the results.  If I am misunderstanding how TestStand is supposed to work, please let me know. 
    Thanks,
    GSinMN    
    Solved!
    Go to Solution.

    What I do is use a Queue to send data to the asynchronous VI.  So it can run and do whatever, but also recieve the commands from the queue.  I use an Action Engine that holds the queue reference and sends the commands.  So you really just have to call the Action Engine from your sequences.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Programatically Creating LabView Step in TestStand Problems

    I am writing a LabView App that generates TestStand Sequences.
    When programatically 'specifying the module' of a TestStand Step calling a LabView VI, is it possible to set the values of the parameters passed to the VI by Name?  I am currently creating steps fine, but the only way I can set parameter values is by using the parameters index. 
    It would be really nice if I could reference the parameters by the name specified in the VI rather than the index derived when the VI is created.
    Any ideas?
    Steve
    Message Edited by SercoSteve on 01-26-2006 05:58 AM
    There are 10 types of people in the world that understand binary, those that do and those that don't.

    Sorry Sam my fault
    Hopefully these are all of the SubVIs and SubSubVis
    regards
    https://decibel.ni.com/content/blogs/DailyCLAD
    Attachments:
    SpecifySeqModule.vi ‏19 KB
    SpecifySeqPassFailAction.vi ‏20 KB
    SpecifySeqCallParams.vi ‏26 KB

  • Combining multiple WMI Queries for Single Step in Task Sequence?

    Hi there,
    since i couldn't find an answer on google i try to find the information here:
    i would like to use a multiple wmi query in a single step in task sequence.
    hat means i want to query fist if the Computer is a Laptop or not and then if yes, if it is from HP  Manufacturer.
    To find out if Machine is a Laptop i use the following wmi query:
    Select * from Win32_Battery WHERE (Batterystatus <> 0)
    To find out if the Machine is from Manufacturer HP i use the following wmi query:
    Select * from Win32_ComputerSystem WHERE Manufacturer LIKE "%HP%"
    my question: is it possible to combine those 2 queries?
    Like IF this is a Laptop AND IF it comes from HP, then install this type of software package?
    Thanks for your answers!

    unfortunely this did not work.
    i try to install specific software for all HP Laptops:
    but this software won't get installed on any HP Laptop. Message according to the logfile
    "The task sequence execution engine skipped an action because the condition was evaluated to be false"
    If i remove one of the WMI-Queries Installation works successfully.
    Can anyone point me what i might do wrong here?

  • How do i select multiple steps and move them?

    Hi everyone! I'm trying to select multiple steps and move them all into a branch of a condition outcome. Here's the thing, I have almost completed my workflow with several steps for dynamic approval, however, i need to put a condition at the very start of the workflow and it does not seem that there is an easy way to move all of the steps into one branch. I find the workflow explorer really clumsy in this respect. Is it easier to just drag one outcome of the condition, say to the very end of the workflow? It does not seem to work for me though...hmmm...
    Thanks and generous points will be awarded!

    Funtion Module 'SWD_GET_WORKFLOW_DEFINITION ' gives the structure of the Workflow definition. The informations are stored in following table.
    1. SWDSTEXT -> Table which gives WF Steps and descriptions
    2. SWDSBINDEF --> Binding information is stored in this table
    3. SWDSMNODES -> All nodes information is stored in this table
    4. SWDSMLINES -> Workflow lines are stored in this table.
    <b>SWDSMLINES</b> and <b>SWDSMNODES</b> are important tables for current requirement. By changing <b>SWDSMLINES</b> the bulk copy and paste can be incorporated. But this is <b>very very risky</b>, better to have a backup of workflow definition before doiing anything.
    Any enthuiasts to write code for a unitlity to move multiple steps ?

  • How can i select the step count of a recursive CTE ?

    I want to select the step count of this query (which one is do fiirst and continue + 1)  from query below
    ;WITH EmpCTE( BomID , empid, mgrid,BomMgrId, lvl, Qty , FLG)
    AS
      SELECT     BomID , empid , mgrid, 0 as BomMgrId , 0, Qty , FLG
      FROM Employees
      WHERE empid = 1
      UNION ALL
      SELECT   E.BomID , E.empid, E.MgrId, M.BomID as BomMgrId , M.lvl+1 , E.Qty , E.FLG 
      FROM Employees AS E
        JOIN EmpCTE AS M
          ON E.mgrid = M.empid
    SELECT BomID , empid, BomMgrId as mgrid , FLG , qty , lvl FROM EmpCTE  WHERE  FLG is null 

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules (you have no idea).
    Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    What you did post is a common design error made by people who do not understand how sets work. This is not RDBMS! It is a sequential file system, kludged in SQL using the recursive CTE that hides the cursors and loops. 
    >> I want to select the step count of this query (which one is do first and continue + 1)  from query below <<
    Step? A set has no concept of ordering. Your question is like asking about the gills on a dog in a veterinarian forum.  
    An SQL programer would have a table (set) with the name Personnel. This is a higher level abstraction. But you have Employees, a sequential file or list. 
    Managers and subordinates are not attributes as you show them. There is a relationship among employees. You have a non-normalized model that mixes relationship and entities together in violation of basic data modeling. 
    We also do not use flags in SQL; that was assembly language.
    Please follow Netiquette and  post the specs and DDL , so we can replace it with a nested sets mode. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Some of my rotation animation is stepping at about one degree increments instead of tweening smoothly.  I'm using classic tweening.  I see that if I select the whole interval and use F6 to convert every tween frame to a key and then select the object at t

    Some of my rotation animation is stepping at about one degree increments instead of tweening smoothly.  I'm using classic tweening.  I see that if I select the whole interval and use F6 to convert every tween frame to a key and then select the object at the different frames, that I see under transform that the skew values are changes from frame to frame aroung that same one degree range.  Is there a solution to this?

    Some of my rotation animation is stepping at about one degree increments instead of tweening smoothly.  I'm using classic tweening.  I see that if I select the whole interval and use F6 to convert every tween frame to a key and then select the object at the different frames, that I see under transform that the skew values are changes from frame to frame aroung that same one degree range.  Is there a solution to this?

  • Programatically show/hide step types in the Steps pane

    When a user on a new Teststand Development bench syncs to a central repository of custom Teststand components and supporting LabVIEW code, I would like to expose only custom step types saved in myTpes.ini in the steps pane. None of the standard step types should be available unless the use explicitly opens an existing sequence file that contains them. I believe this can be done through the API when Teststand launches, but I don't know where to look for the appropriate API methods. For example, is there a methods to load or unload a specific type palette to or from memory? Any help would be much appreciated.

    Hi Charlie,
    As of right now, there does not appear to be a way to programmatically change step type menu items from visible to hidden via the TestStand API.  Someone has posted a product suggestion for this type of functionality to be made available in a later version of the software, however.  You can view it here.  I would recommend giving this idea kudos in order to boost its chances of being implemented in a future release.
    Hope this helps!
    Regards,
    Stephanie R.
    National Instruments
    Stephanie R.
    National Instruments

  • How to programatically select text for editing in an af:inputText control?

    Hello, I am new to jdeveloper 11.1.1.3.0 and have searched and searched for info. I must be using the wrong terms as I cannot find any info or example on how to programatically select text for editing in an inputText field.
    My request is to change an existing app so when the user presses a button, control should go to the inputText control (this part works, see existing backing bean code from another developer below) but automatically select the text within for editing by the user (saving the user from having to select the text first before editing).
    Backing bean code to set the focus to an inputText field:
    * sets the cursor to the given component id
    * @param  componentId of item on page
      public void setFocusOnUIComponent(String componentId) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ExtendedRenderKitService service =
          Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
        UIComponent uiComponent = facesContext.getViewRoot().findComponent(componentId);
        service.addScript(facesContext,
          "Component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); Component.focus();");
      } I hope this isn't a dumb question and would appreciate it if someone can steer me in the right direction.
    Thank you for any info,
    Gary

    Hi,
    not a dumb question at all. Before answering it, here some comments on the code you pasted in your question
    1. UIComponent uiComponent = facesContext.getViewRoot().findComponent(componentId);
    This code line is not used at all in your method. So it seems you can get rid of it
    2. "Component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); Component.focus();");
    I suggest to change it to
    "var component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); component.focus();");
    as it is better coding practice to have variable names starting with a lower case letter and being flagged with the "var" identifier
    For pre-selecting text in an an input component, there is no API available in ADF Faces, which means you need to reach out to the rendered HTML ouput. To access the markup for the rendered component, you can try
    var markup = AdfRichUIPeer.getDomContentElementForComponent(component)
    If this markup returns the HTML input component then you can use JavaScript you find on the Internet to select the area of it. If it does not return the input component then you may have to use
    document.getElementById(componentId+'::content')
    Note however that working directly with generated HTML output bears the risk that your code breaks when - for whatever reason - the ADF Faces component rendering changes in the future
    Frank
    Frank

  • Programatically select a different tree node.

    I have constructed the tree using ChildPropertyTreeModel. How do I programatically select another node in the tree? Also, after programatically selecting the tree node, does the model get reflected so that model.getRowKey() returns the newly selected node?

    In order to programatically select another node in the tree, you can use the following:
    tree.getSelectedRowKeys().clear();
    tree.getSelectedRowKeys().add( newKey );In order to have the tree point at the newly selected node, use the following:
    tree.setRowKey( newKey );If you do this tree.getRowKey() will point to the new one. If you don't do this I'm pretty sure tree.getRowKey() will just point at whatever it was pointing at before. Also it's important when you make changes like this to refresh the content of the tree, which can be done using RequestContext.getCurrentInstance().addPartialTarget( tree ).

  • Step failure causes sequence failure Option

    Hi !
    I need some clarification about the Step failure causes sequence failure Option , I'm using TS 4.2 Under Win XP .
    Lets say i have a Seq with 4 steps in all of then Step failure causes sequence failure Option is Checked .
    Record Result in all of the3 steps is Checked , If the first step will fail will it perform the next steps ? and will it record the result for this steps ?
    Thank U . 
    Kobi Kalif
    Software Engineer

    Record Result in all of the3 steps is Checked , If the first step will fail will it perform the next steps ? YES
    and will it record the result for this steps ? YES
    What this is signifying, is if a Step fails then when the Sequence has completed and returned back to the caller the status of this step will be FAILED.
    If you need to jump to Cleanup then you will need to set the Post Action.
    regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for

  • Return to vendor process from backend

    Could anyone of you please share the plsql pseudocode or full process code for return to vendor process ? Regards, Kumar Edited by: 857804 on May 10, 2011 6:20 AM

  • How to measure the analogy voltage from different source?

    Hi all,   I am trying to measure the voltage generated from a function generator ranged from -2V to +2V. I am trying to use a PCI-6023E for analogy input. I directly connect the voltage output from the generator to one of the analogy input channel, b

  • IPhoto deleting images?

    I'm not sure if it was the most recent combined update or something else, but all of my images have been deleted from the library. They are still in the database, but not on the disk and not in the trash. Luckily, I have a recent backup, but I'll sti

  • MAP Toolkit inventory computers on remote domain through vpn

    Evening, Basically as the title says I need to pull inventory report using MAP toolkit from my remote domains the access of which is achieved through VPN. When I run the MAP wizard I get to the point were it asks me to specify domain (ex domainname.m

  • Ext page arrow[s] missing from base on column...why! hwlp pleaseant click onto next page

    have used'''''' '''''''''''''''''''''''firefox''''''''''''''''''''''''''l''' with ''' ''''''''''''''hotmail.com'''''''''''''''''for long time.. but currently n ext page arrows at base of hotmail column have gone missing.. .i e not visible.... why....