interoperability c# get the name of the step

I'm trying to use a code c# module in order to be able to read the name of the step of the call. However, my code only all returns 'Step' as the name of the object (no matter what the step is actually called in the sequence). Note that I also tried to do the same thing to get the name of the calling sequence - and it always returns 'Sequence '. Where I'm going wrong? Here's the code: (see attachment for full source and example TestStand sequence in the "Debug" folder.

using System;
using System.Collections.Generic;
using System.Text;
using NationalInstruments.TestStand.Interop.API;
using System.Windows.Forms;

namespace Test
{
public class TestClass
{
public void TestMethod (SequenceContext thisContext)
{
PropertyObject pObj = thisContext.AsPropertyObject ();
PropertyObject stepObj;
stepObj = pObj.Evaluate ('Step');
MessageBox.Show (stepObj.Name);
}
}
}

As a bit of background, I'm trying to retrieve the name of the step of the call and the name of sequence all call them all the way to the top of the stack to the root. This same method works using the steps of the Expression, but I would like to hide the mess in a single code module. Any ideas would be appreciated!

Thank you

Phil

Hi Ray,

Thanks for the tips. Unfortunately, I think I did my a little too simplistic example! Your solution is perfect for the case of the name of the step, unfortunately, this won't work for what I'm trying to do. I write a journal of custom result which is called from the ProcessModelPostResultListEntry callback and check if 'The RecordResult' is enabled on all stages of SequenceCall in the stack and if every sequence in the stack has the option "RecordResults" is enabled. (Essentially, result record should be enabled at all levels so that the result to be connected). You may think that the recall of ProcessModelPostResultListEntry would be called only if this condition is met - unfortunately, it is only affected by the combination more nested "RecordResult" step and the properties of "RecordResults" of the sequence. Therefore, frustrating, I need to check all the way to the top of the stack to the ProcessModel. The reson why it is more complex, it is that step and sequence property further to the top of the battery are accessible by using the Evaluate() method, as opposed to the lowest level in the stack that can be accessed via thisContext.Step and thisContext.Sequence.

In any case, I worked it out in the end: in TestStand Expressions allow you to take a number of shortcuts to APIs that are not available when you use the API in a different language - so why I was able to use phrases such as:

Locals.SequenceRef = evaluate ("RunState.Caller.RunState.Caller.Sequence"),

Locals.SequenceName = SequenceRef.Name

Locals.SequenceRecResult = SequenceRef.RecordResults

whereas the similar c# code worked as expected (note that the string of RunState.Caller above is actually built dynamically depending on the depth of the call stack).

Be more explicit in c# works correctly even if:

seqObj = pObj.Evaluate ("RunState.Caller.RunState.Caller.Sequence");
SequenceName = seqObj.Evaluate ("name"). GetValString ("", 0);

SequenceReqResults = seqObj.Evaluate ("RecordResults"). GetValBoolean ("", 0);

Although writing this response, I just found the following property:

SequenceContext.CallerDiscardsResults

' Returns if any order in the call stack tells TestStand to disable the results or if any step caller in the call stack instructed TestStand do not save results.

Typical! I think that this may be an easier to use way!

Thanks anyway,

Phil

Tags: NI Software

Similar Questions

  • When I try to change my credit card information, I get the step that the billing address is wrong.

    What do I change my credit card on my account information.

    Verify account problem https://forums.adobe.com/thread/1275549

    Providing all the information, I have, because you really need Adobe to fix this problem

    Ensure that EACH DETAIL is the same in all places, you enter your information

    -in how to spell and punctuate the parts of your name and address

    A few changes/Verify account https://forums.adobe.com/thread/1465499 links that can help

    -Credit card https://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting-cr creative - cloud.html

    -or by phone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

    -e-mail https://forums.adobe.com/thread/1446019

  • Get the name of the current stage of MainSequence in parallel sequence

    Hello

    I starts a sequence in parallel of the MainSequence by "use new run." This parallel sequence is constantly in querying CPU performance data for my USE and records 'on the fly' an Excel file while the MainSequence turns the test scenario.

    To get a clear reference of the performance of the CPU DUT to test steps, I need to somehow get the name of the step of the test step currently performed in the MainSequence for saving it and the CPU performance data.

    Is it possible to identify the current stage of the main sequence in the parallel sequence (for example, property)?

    Thanks in advance,

    MRet

    Rette01 wrote:

    Hi Doug,.

    Finally, we have updated to TestStand 2013 and try to use your example.

    We have some problems to get the referral of wire, which is replaced by "threadToMonitor" in the expression you have posted, as far as I understand.

    The thread to monitor is the MainSequence. So, how can I get a reference to the MainSequence?

    Kind regards

    Rette01

    Pass RunState.Thread as a parameter to the call of the sequence. The parameter must be specified as an object reference variable.

    -Doug

  • Get the names of palette file types

    Hello

    How can I get the names of all types of step programmatically in a palette file?

    In my view, it should be possible, but I tried different approaches using the poster of API reference and couldn't find a way.

    Thank you and best regards,

    Aditya

    TestStand 4.2.1

    LabVIEW 2009 SP1

    propertyObjFile.TypeUsageList.NumTypes

    propertyObjFile.TypeUsageList.GetTypeDefinition)

    typeaspropobj. TypeCategory is TypeCategory_StepTypes

    Hope this helps,

    -Doug

  • get the properties of a sous-suite programmatically steps

    What would be the path to get references to the steps programmatically in a subsequence in a sequence? -try to achieve in LabVIEW.

    Thank you!

    You can get a reference to any sequence using RunState.SequenceFile.GetSequenceByName () and pass the name of the sequence you want to acquire a reference to.

    For example, if you are in the prior expression of a stage in SequenceCall, you can use RunState.SequenceFile.GetSequenceByName (Step.Module.SeqName) to get a reference to the sequence that is called by this step.

    You then have access to the tables of the measures within each group of step (the program installation, hand, cleaning) within this sequence.

  • How to get/set asking for information about the step

    Hello

    I want to get the name of the step, type of step, step during the test limit, and also I want to change the limit in the test case, how can I do this?

    BR

    Bendy

    already know how to do it access to the step object, then can get/set information of it.

    PropertyObjectPtr stage;

    Step = SeqContextDisp-> AsPropertyObject()-> GetPropertyObject("Step",0);

    CString itemname = step-> GetName (); get the name of the element

  • Update the name of limit to the execution of the step

    I need to run through a few test steps in a TestStand sequence several times.  This would not be a loop on a single step or group of steps, but probably a goto label 'for' loop in TestStand.  BTW, the code calling TestStand 2.0.1 to a DLL of LabWindows/CVI via the adapter standard prototype.  Updated every iteration that I need to have the names of limit of test step with a different suffix.  So step 1 could have results0 and results 1 and on the 2nd results0 performance would be renamed results0b.  How to upgrade limit, running names, a function of LabWindows/CVI?  That is, the first test in the sequence main would update the steps below to update the suffix.  I started in the way of the use of TS_SeqContextGetProperty to get the descriptor sequence

    TS_SeqContextGetProperty (testData-> seqContextCVI, & errorInfo, TS_SeqContextSequence, CAVT_OBJHANDLE, & seq_hndl);

    in the main tab, then using TS_SequenceGetNumSteps (seq_hndl, errorInfo, TS_StepGroup_Main & num_steps) to determine the number of steps.

    Enter a for loop:

    TS_PropertyGetValString (testData-> errorInfo, buf, TS_PropOption_NoOptions, & seqContextCVI (char *) & rslt_name) with beef as "Sequence.Main [0]." "Result.Measurement [0] '-error with a message of invalid name.  The idea is to get this value, update the iteration of TestStand-based (it's already acquired and work), and then set the return value.  Proceed to the next step and so on.

    Any suggestions?

    Thank you.

    Unfortunately, TestStand error numbers are not exclusive, so it may not be of the below of the case.

    I saw a case where this error could be caused by not properly declaring the variables used by the DLL function.

    It could also be that the DLL is not properly released after the first run, which causes the error in the second inning.

    Another time, it turns out is when CA_DiscardObjHandle and CA_FreeMemory are not properly used.

    It seems to be a memory issue, as you mentionned related. I would like to know if it's one of the situations above.

  • How to get the parameter values of a step type custom when I create file and adding a type of step seq

    I use lv 8.5 and teststand 4.0.

    I did a step type custom and recorded at the MyTypes.ini in pallets of type.

    I specified a default module by opening the properties of the custom step of *.ini type window, then I put some values of the parameters.

    T1) when I open teststand and I add the custom step type manaully in seq file, the labview module parameter values are represented.

    But, if to use file (create and add support prototype stage), the labview module parameter values has the default value.

    Using joint file, how to get the setting custom step type values I put in *.ini?

    Q2) each type of step are automatically by name through the use of LoadTypePaletteFilesEx. When I open teststand and I add the custom step type manaully in seq file, the module is loaded automatically. Inside the attachment, I use a prototype of charge and a fixed path where the module labview is to load the labview module.

    Can I load module automatically without using a prototype of charge or how can I get a dynamic path of type step?

    I solved Q1 for myself by using the mapping tab of the parameter within the configuration to the default module window.

    Everyone knows Q2?

    Thank you.

  • How to get the index of the step of a market...?

    Hello...

    I want to put the RunState.NextStepIndex. I don't want to encode the value. I want to get the stepIndex of a particular step dynamically so that even if the steps are moved I always go to the same step. How can I get the stepIndex of any stage...? should what method I use...?

    Once you have a reference to the sequence, you can call GetStepIndex.

    Method GetStepIndex

    Syntax

    Sequence. GetStepIndex (nameOfStep, stepGroupParam)

    Return value

    long

    Returns the index of the step with the name that matches the name that you specify. Returns - 1 if no such process exists.

    Goal

    Returns the index of the step with the name that matches the name that you specify.

    Parameters

    nameOfStep String

    [In] The name of the step that you want the index of. If there are several steps using the same name in the group stage, the method returns the index of the first stage of this name. Name comparison is case-insensitive. You can also pass a single step ID.

    stepGroupParam As StepGroups

    [In] Specifies a given market group.

    Hope helpls,

  • During installation - I get the error "file name too long."

    During the installation of the software downloaded to my psc1315v, I get an error "file name too long - {A1062846-0846-427A-92A1-BB8251A91E91} and my sanner will not work."

    OPS: XP 32-bit

    Download file: gc_wo1 - ENU_NB.exe

    Hi gcflost,

    Follow the steps below and let me know what happens?

    First step: clear temp directory

    1. Type %temp% term or search programs and files of field
    2. Select all the files in this folder, and then press the delete key to remove. If you receive a message that the file is in use, you will need to ignore this file (s).
    3. Proceed to step 2 below

    Second step: downloaded and extracted to your system:

    1 download the drivers and full software features

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=MP-23606-3&cc=US&DLC=en&LC=en&os=228&Product=374568&sw_lang=

    2. once the download is complete, double-click the file to extract the software.

    3. when the installation window opens, press the Cancel button to stop the installation

    4. tap folder in the race or search programs and files of field

    5. Locate and open the folder starting with 7z (example: 7zS2356)

    6. right click on the folder and select copy

    7. close this window and all open windows, and then in the Middle the desktop right click your mouse and select Paste. This will move the 7z folder on your desktop.

    8 open the 7z, that you just copied on your desktop

    9 open the Util folder

    10 open the CCC folder

    11 start the uninstall_L4

    12. once the uninstall is complete, restart the computer

    13. run disk cleanup from the tools Accessories\ system under all programs folder

    14. download and install the latest version of Adobe flash player

    http://www.Adobe.com/support/flashplayer/downloads.html

    15 open the 7z folder and then double-click the Setup.exe file that will be towards the bottom of the open window. Follow the instructions on the screen to reinstall your printer.

    Let me know if you are able to successfully install the software and driver and are able to print & scan?

  • I can't get the sender ID name and appellant to appear in the columns of fax Windows and scanning.

    I can get the info if I right click on the fax and click Properties so I know that I get the info, just can not get to automatically mount in the columns.

    Hello
     
    To add the ID of the sender's name and calling to appear in the columns of Windows Fax and Scan. Try the following steps.
    1. click on start, type fax and scan, click Windows Fax and Scan from the list.
    2. click on the view menu, click Add/Remove columns.
    3. Select the items you want to display and add them.
     
    Add these elements to the columns, and it should show the details like who sent the fax.
     
    Windows Fax and Scan: http://www.microsoft.com/windows/windows-vista/features/fax-scan.aspx
     
    I hope this helps.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.

  • How to get schema name and assign it to a column in the table target

    Hi team,

    I am getting the error while getting the schema name that you assign to a column target

    Implementation of the column:

    < % = odiRef.getSchemaName ("W") % >

    ERROR:

    ===========

    ODI-1217: Session TEMP (342001) fails with return code 904.

    ODI-1226: step TEMP fails after 1 attempt.

    ODI-1240: Flow TEMP fails during an operation of integration. This flow of charge target TEMP table.

    ODI-1228: failure of the TEMP (integration) task on the target of ORACLE ORACLE_MSR_SRC connection.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "USERINROW": invalid identifier

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    =============

    Implementation of the column:

    < % = odiRef.getSchemaName ("ORACLE_MSR_SRC", "DEVELOPMENT", "W") % >

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: error in the interpretation of the task.

    Task: 4

    java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getSchemaName ("ORACLE_MSR_SRC", "DEVELOPMENT", "W"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: insert new lines to the line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:489)

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:737)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    Plz help me how can I get the user name ie... diagram for this target and the insertion in the table.

    Thanks in advance... Suggestions or advice much appreciated.

    Kind regards

    Khaled

    Use the Subtstitution method getInfo() Odi

    <%=odiRef.getInfo("pPropertyName")%>

    pPropertyName can be

    SRC_SCHEMA name of the schema of the data in the source environment
    SRC_WORK_SCHEMA name of the schema in the environment of the source
    DEST_SCHEMA name of the schema of data in environment target
    DEST_WORK_SCHEMA name of the schema in the environment target

    Kind regards

    Samir Bishwamilan

  • Hello, when installing Adobe Creative cloud, you get the error: program stopped working "Adobe Creative Cloud" Windows can check online for a solution to fix this error on the Internet. The next step is really for a solution online

    Hello, when installing Adobe Creative cloud, you get the error: program stopped working "Adobe Creative Cloud" Windows can check online for a solution to fix this error on the Internet. The next step really is to get an online solution and close the program, close the program. Signature of the problem:

    Problem event name: BEX

    Application name: Cloud.exe Creative

    Application version: 3.4.3.189

    The timestamp of the application: a 56702, 75

    The name of the module with the error: StackHash_0a9e

    Version of the module with the error: 0.0.0.0

    The module of time with error stamp: 00000000

    The exception of compensation: 00000000

    Exception code: c0000005

    Exception data: 00000008

    OS version: 6.1.7601.2.1.0.768.2

    Language code: 1049

    Additional information 1: 0a9e

    More information 2: 0a9e372d3b4ad19135b953a78882e789

    Additional information 3: 0a9e

    Additional information 4: 0a9e372d3b4ad19135b953a78882e789


    uninstall all cc on your computer.

    clean a http://www.adobe.com/support/contact/cscleanertool.html

    Restart your computer

    suspend your antivirus/antimalware

    Right-click on the file to install the desktop application, and then click "Run as Administrator".

  • Get the value based on the column names for the custom of the Webcenter content metadata field

    University Complutense of MADRID, I created a custom text metadata field.  I then activated optlist this area.  I fill the optList values, I use a view.  The view has three columns.  Let us call their ID, Key, Value.  OptList shows keys in its list.  I then create content (Content ID: MyContent) Webcenter content and choose the OptList values for my new field of metadata (MyField).

    WebCenter portal, I'm filling a selectOneChoice with MyField values in the content ID: MyContent.  Remember the previous step, the values entered in selectOneChoice lists them selected values from the field MyField optList.  The optList is filled from view.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "selected value - matching value from the view of the optList that fills MyField.

    In my opinion, only an example will be useful:

    This is a view that I created in Configuration Manager applet in Webcenter content Admin cmdlets :

    ID | State | Capital

    1. North Carolina | Raleigh

    2. California | Sacramento

    3. Illinois | Chicago

    Then I create a custom field (name: MyField).  MyField is an optList values are filled with view created above.  Internal value and the display value are the two State.  Then I have a new content with Content Id Check-In: MyContent.  To MyContent, I select these values in OptList MyField: {North Carolina, Illinois}.

    In my portal Webcenter application, I create a Taskflow presenter content.  I have set up as single content item presenter.  I attribute as content ID MyContent.  Then, in templateView, I get all the values of MyField in MyContent and display as selectOneChoice.  I created a javascript function that would get the value that the user selected in selectOneChoice.  In the view created in the Webcenter content Configuration Manager (see above), there is a value corresponding to each displayed value.  So, for the selected value, I need to get the corresponding Capital and display in my alert message.

    Starting from Javascript, how can I get the value of the Capital, since I have the status value.

    Hello.

    The idea to reach your requirement is planned:

    • Create an Assistant manage bean that will appeal as access map: #{stateUtil ['Calofironia']} (it will return Raleigh). This value will get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your managed bean.
    • Pass the result of #{stateUtil ["statename"]} to your JavaScript function to help

    I hope this information help you.

    Kind regards

  • Get the name of the folder after parent.

    Hi forum.

    I need a big help on your part.

    If I could get the name of the folder that is between the office and the indesign files where it saved ls...

    for example.

    /Users/wleastudio/Desktop/rantacacb.indd.

    I need to get the file name selected in red and alert...

    If it isn't immediately on desktop I can do easily alert as below...

    name = Folder("/Users/wleastudio/Desktop/");

    If (app.activeDocument.filePath == name.path + "/" + name.name) {}

    Alert ("the document is in the office"), out;

    }

    If the document is saved in a folder on your desktop, that's the problem, I find it difficult to find the name of the folder and get alert...

    /Users/wleastudio/Desktop/rantacacb.indd.

    Thanks in advance

    Hello

    artCraft2 wrote:

    ...

    If it isn't immediately on desktop I can do easily alert as below...

    ...

    It's always all right way:

    the last folder name: app.activeDocument.filePath.parent.name

    last folder: app.activeDocument.filePath.parent

    You could step using parent.parent and so on...

    Jarek

Maybe you are looking for