How to create programmat​ically a new step type in TestStand (to myTypes.in​i)

I need to create a new step type to myTypes.ini file programmatically. I have tried to do it with following steps:
- Get reference to engine
- Load type palette files
- creating new step type (engine.NewSteptype() )
- Inserting new type using TypeUsageList.InsertType method. Problem with this is the first parameter. It excpects it to be in a form of PropertyObject, but engine.NewStepType returns it as a StepType object. If I try to use StepType.AsPropertyObject it returns an error.
How to convert StepType object to a PropertyObject?

And here it is in C++:
TS::IEnginePtr mEngine;
SAFEARRAY * typeList;
TS::TypeUsageListPtr typeUseage;
TS:tepTypePtr stepObj;
mEngine = engine;
mEngine->LoadTypePaletteFiles();
typeList=mEngine->GetTypePaletteFileList();
TS:ropertyObjectFilePtr *rgelems;
SafeArrayAccessData(typeList,(void**)&rgelems);
typeUseage = rgelems[0]->TypeUsageList;
stepObj=mEngine->NewStepType();
TS:ropertyObject *property = stepObj->AsPropertyObject();
property->PutName("TestMe");
typeUseage->InsertType(property, 0, TS::TypeCategory_StepTypes);
rgelems[0]->IncChangeCount();
rgelems[0]->SaveFileIfModified(true);
SafeArrayUnaccessData(typeList);

Similar Messages

  • How to create and implement a new work schedule rule successfully?

    Dear Community,
    How to create and implement a new work schedule rule successfully?
    In other words, what are all the basic steps to create and implement a new work schedule rule successfully?
    Thanks in advance.

    Hi,
    Follow the below steps to create Work Schedule:
    Holiday Calendar
    Transaction Code: SCAL
    Holiday calendar comprises of list of paid holidays to be given to employees on festivals by the company.
    Personnel Area/SubArea Groupings
    Go to SPRO --> Time Management --->Work Schedules --> Personnel SubArea Groupings
    Maintain perosnnel area/Subarea groupings for work schedule.
    i.e. Suppose in Mumbai you have WS = GEN ( 10 to 6) and in Chennai you have WS = NORM ( 8 to 4 )
    Work Schedule
    Go to SPRO --> Time Management --->Work Schedules -->Daily Work Schedules
    Go to SPRO --> Time Management --->Work Schedules -->Period Work Schedules
    Daily Work Schedule is actually your office timings with breaks (paid /unpaid) i.e. Planned Working Time which is then included
    in Period Work Schedule to make a week ( M T W T F S S )
    Daily Work Schedule (i.e. Day) -
    > Period Work Schedule (i.e. Week)
    Work Schedule Rules
    Go to SPRO --> Time Management --->Work Schedules -->Work Schedule Rules and Work Schedules
    After doing above mentioned configurations,maintain employee group/subgroup groupings in which you have to define which calendar is applicable for which type of employees for which work schedule.
    You will maintain this work schedule in infotype 0007 - Planned Working Time of employee via transaction code - PA30

  • How to Create and Test a Zone of Type F1-APP-URL

    Hi,
    I would like to how to create and test a Zone of Type F1-APP-URL?
    What all is required to setup an ADF application based URL in F1-APP-URL, what to configure and what are the basics or definite steps required to have a Zone of Type F1-APP-URL up and running in the application? Any Sample ADF components to be created?
    Please kindly let me know. Any test or dummy URL existing already which is based on ADF?

    Refer to Doc. Id 1515146.1 on the support site. Although for the moment it refers to a MWM example and may not be much of a help but it'd give a basic idea as to how it should be done.

  • How to create a macro for a planning type in MC8b transaction

    Hi,
    I am presently working for a product allocation demand, which have a information structiure with characteristic and key field.
    the characteristic are production allocation quantity, incoming order quantity, and open order quantity.
    i have created a planning type in which the data updation takes from the excel file to the planning type in mc95.
    but i need to create a macro for this planning type .
    can any body give the details information how to create a Macro for a planning type.
    Thanks and regards
    GopalKrishna

    Dear Gopal
    May be the link would be helpful to you.
    [Planning Types and Macros|http://help.sap.com/saphelp_46c/helpdata/en/a5/631cc443a211d189410000e829fbbd/frameset.htm]
    Drill down the left tab once you opened the link, for more information.
    Thanks
    G. Lakshmipathi

  • How to create a account key for application type M ?

    Hi Guys,
    How to create a account key for application type M ? and link the same with
    Gl account.
    thanks.

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • Is binding Mail step one way ? how do i send values to next step type

    hi,
        Is binding Mail step one way ? how do i send values to next step type. In mail task i calculated few values and sent it as mail i want those values to be sent to an activity how do i do that.
    Regards,
    Hari

    Are you using asend mail task. If so i Think there is no requirement to bind the value from Wflow to task.
    If you are using a Method other than send mail task you can bind the container element.
    But I could not understand what you are doing in the method of sending mail?
    Thanks
    Arghadip

  • Latest IVI Class Step Types in TestStand

    IVI instrument classes have recently been defined for RF Signal Generator, Spectrum Analyzer and Power Meter. There are IVI drivers for these classes available for download from the Instrument Driver network. However, TestStand3 does no contain step types for accessing these drivers. Does anyone know when NI plans to add support for these to TestStand? Has anyone created step types for these classes, or have an example of how to do this?

    David -
    There is no documentation on the low-level workings of the TestStand IVI step types. As with many of the step types that have source code, it is available as examples of developing a step type in various languages.
    The additional work to add the a new class to the TestStand IVI step types is not small, that is why to date we have not done it. The amount of work could be divided into the following areas:
    * Update the TsIviStepTypes to add the new class to the enumeration.
    * Create the new step type definition (subproperty structure) based on the IVI spec.
    * Upcate the TSIviStep and TSIviSFP code to allow you to edit and perform the work to process the expressions and initiate the various IVI class operations.
    * Add low level
    IVI class layer logic to talk to the IVI class driver. This piece was previously done in a VB ActiveX control written by the Measurement Studio group in NI.
    The last two items are the biggest and they would take some time. That is why I was suggesting creating specific Action steps that call into custom code modules to talk to IVI directly, that is, no edit dialog box, no SFP, etc.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • Know steps names of called sequence file using sequence call step type in TestStand

    Hi,
        I have a problem in accessing step names in called sequence file using "Sequence call"step type in TestStand 4.0.
    I would list out all step names of called sequence file. Is it possible to do through C#.NET? If, yes, Please explain to me in detail with possible example.
    Thank you,
    regards
    RKK

    Hey RKK,
    I want to first set your expectations for the forums.  This is not a place for people to review and rewrite your code for you; this is a place for specific and general questions.  I am not saying your question in this thread is inappropriate, because it is a good questions.  We should just not post code and ask others to fix it here.  If you are looking for this type of service we have alliance members that can help you write your TestStand Operator Interface (www.ni.com/alliance).
    As for you question about getting the sequence names for a sequence file that is not the currently running sequence file, you will need to open a reference to that sequence files and then use the API calls that I mentioned in my previous posts.  You can use the Enigine.GetSequenceFileEx function to open a reference to sequence file, and you will need to close the reference with the Engine.ReleaseSequenceFile function when you are done using it.  After you have a reference to this external Sequence File, you can use the example dll and sequence I previously sent you.  I also attach a new sequence file (SeqFile2.seq) plus an updated GetNames.seq to illustrate how to use the above mentioned functions.  I hope this helps.  Have a great day!
    Best Regards,
    Software Engineer
    Jett R
    Attachments:
    GetNamesOfSequencesInFile.zip ‏52 KB

  • Insert a specified built-in or custom step type in Teststand using CVI

      I try to build a step type . this step type specifies an adapter of DLL, which is developed under CVI. I want to use Teststand API functions in CVI to fulfill the following functions.
      1, insert a specified built-in or custom step type into current sequence;
      2, insert a specified built-in or custom step type into another sequence.
    Thanks!
    Jacky

    Hi Jacky,
    There is an example program called Programmatically Inserting a Step into a TestStand Sequence Using LabWindows/CVI and a KnowledgeBase called Programmatically Inserting a New Step in the Currently Executing Sequence that should answer your question.
    Hope this helps!
    Best Regards,
    Jonathan N.
    National Instruments

  • How to create recovery partition in new(changed) HDD.

    my new HP pavilion g4 laptop HDD have crased, then I replce it by HP care. I upload original win 7 by recovery disk(DVD) but when I open my computer it shows only one partition (C drive, there is no recovery partition and HP tool.
    So how to creates recovery partition by recovery disk(DVD)...........please help me.

    Creating the recovery partition
    Right-click the start orb, and start 'Disk Management'.
    Shrink the C: drive by let's say 20-30GB.
    Then create a new Partition and assign the R: label to it and name it RECOVERY.
    Then open command prompt as administrator and type: 'recimg /createimage <directory>',
    In this case: 'recimg /createimage R:\' to save it on the new partition.
    This step may consume a lot of time.
    Now we need to register the newly created recovery image: 'recimg /setcurrent <directory>'
    'recimg /setcurrent R:\'
    Voila you are done.
    Restoring from recovery partition
    You may want to use this restoring method by default, because it is the easiest way to do so if your recovery partition is still intact. If not, look at the other recovery methods to see which suits you best. This is usually the way you reset or refresh your Windows installation if you purchase a computer from a brand like Lenovo instead of building one yourself
    Press the Windows-key + C to open the charms bar or swipe in from the right.
    Click Settings.
    Click Change PC Settings.
    Click Update & Recovery in the menu on the left.
    Click Recovery.
    If all your documents are safe and sound in your user folder, you can use Refresh your PC without affecting files. However I still recommend taking a back-up... If you want to do a complete reinstallation of Windows and also clean your user folder in the process then choose Remove everything and reinstall Windows.

  • How to insert a new step type into a submenu?

    Hi!
    I'm inserting a step type into the MyTypes.ini file with c++.
    With the code below I managed to put it into a menu (in the step type menu editor it is called "Group").
    But I want a sub menu.
    How can I put it into a sub menu (in c++)?
    Who can help me? Thanks in advance!!!
    Here is the code:
    property->PutName("StepTypeName");
    typeUseage->InsertType(property, 0, TS::TypeCategory_StepTypes);
    stepObj->PutMenuGroupName("StepTypeMenuGroup");

    TSNewbie,
    There is no API method to edit those groups. I can only suggest to use the Step Type Menu Editor to create the group you want and make it a submenu. Then when you call stepObj->PutMenuGroupName("SubMenuGroup") the step type will be in that submenu.
    I apologize if this isn't the answer you are looking for.
    Ronald Byrd (NI)

  • How to create a notification for new virtual machines created on Hyper-v Using SCOM or another way?

    Hi ,
    We need to  to create a notification for new virtual machines created on Hyper-v Using SCOM or another way
    thanks

    http://sincealtair.blogspot.com/2010/04/how-to-ask-questions-in-technical-forum.html
    Not nearly enough information.
    If you are asking about SCOM, it is better to ask in the SCOM forum -
    http://social.technet.microsoft.com/Forums/en-US/home?forum=operationsmanagergeneral
    .:|:.:|:. tim

  • How to build a TestStand 2012 workspace ( insert a project / insert a folder) programmat​ically using LabVIEW 2012 and the TestStand API.

    Hi everybody!
    I am just trying to find out how to create a TestStand workspace … in LabVIEW using the TestStand API.
    To create a new workspace was quite easy. Unfortunately I am not successful to insert a new or existing project to the workspace.
    Furthermore I have to insert a folder from disk to the new or existing project in the way that I can use an absolute path for the directory …  
    Maybe someone had already solved this problem, in any case  I am thankful for any hint.
    Greetings from Germany,
    Norbert

    Have you find out how to add a folder to a project? I'm looking for this to... I tried WorkspaceObject.NewFolder[Name]whitout success...
    For creating Workspace and project see the newer resolved thread I created.
    Martin

  • How do I programmat​ically open block diagram?

    Hi, All
    How do I programmatically open block diagram of subVI and add frame to event structure
    Thanks,

    Could you be a bit more specific on what you are trying to do?
    Do you want to programmatically edit an existing VI that is currently not running? As mike said, scripting could work but it is unsupported (see the Lava scripting forum for details: http://forums.lavag.org/LabVIEW-VI-Scripting-f29.h​tml). Somehow, adding an event case does not give you much, you would also need to add the code contents and hook everything up to the existing controls, indicators, and other nodes.
    If you just need an event that is not always active during run, maybe you can use user events. Check the online help. (Also have a look at e.g. section 4 in the following application note:
    http://zone.ni.com/devzone/cda/tut/p/id/2994.
    LabVIEW Champion . Do more with less code and in less time .

  • How to create the funtion module with step by step

    friends can u help me regarding how to create the function module very urgent,
    regards
    bhavani

    To create a function module, you first need to create a Function Group which will keep all the function module of same functionality.
    To create a Function Group, go to SE80->Click on Workbench-Edit Object->Function Group Tab->Enter Function Group name-> Click Create.
    To create a Function Module:
    Go to T.Code SE37->Enter the Function name->Enter Function Group name n Short Des.-> Here you need to define Import, Export parameters with the condition. Also you can write your code in source code tab.
    check this link
    Converting seconds values
    check the FM code. if you don't have this FM code, create it in SE37 and make use of it.
    FM MONI_TIME_CONVERT
    FUNCTION MONI_TIME_CONVERT.
    ""Lokale Schnittstelle:
    *" IMPORTING
    *" REFERENCE(LD_DURATION) TYPE SY-TABIX
    *" EXPORTING
    *" REFERENCE(LT_OUTPUT_DURATION) TYPE SWL_PM_CVH-DURATION
    DATA: LD_HOUR(4) TYPE N. "
    DATA: LD_MIN(4) TYPE N. "
    DATA: LD_SEC(4) TYPE N. "
    DATA: LD_VALUE2(2) TYPE N.
    DATA: LD_VALUE3(3) TYPE N.
    DATA: LD_VALUE4(4) TYPE N.
    DATA: SAVE_DURATION LIKE SY-TABIX.
    data: ld_minus(1).
    SAVE_DURATION = LD_DURATION.
    if ld_duration < 0.
    save_duration = save_duration * ( -1 ).
    ld_minus = true.
    endif.
    CLEAR LT_OUTPUT_DURATION.
    IF SAVE_DURATION NE 0.
    LD_HOUR = SAVE_DURATION DIV 3600.
    save_duration = save_duration - ld_hour * 3600.
    LD_MIN = SAVE_DURATION DIV 60.
    save_duration = save_duration - ld_min * 60.
    LD_SEC = SAVE_DURATION.
    IF LD_HOUR LE 100.
    LD_VALUE2 = LD_HOUR.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+3(2).
    ELSEIF LD_HOUR LE 1000.
    LD_VALUE3 = LD_HOUR.
    WRITE LD_VALUE3 TO LT_OUTPUT_DURATION+2(3).
    ELSE.
    LD_VALUE4 = LD_HOUR.
    WRITE LD_VALUE4 TO LT_OUTPUT_DURATION(4).
    ENDIF.
    WRITE ':' TO LT_OUTPUT_DURATION+5.
    LD_VALUE2 = LD_MIN.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+6(2).
    WRITE ':' TO LT_OUTPUT_DURATION+8.
    LD_VALUE2 = LD_SEC.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+9(2).
    LT_OUTPUT_DURATION = LT_OUTPUT_DURATION+1.
    if ld_minus = true.
    write '-' to lt_output_duration+1(1).
    endif.
    ELSE.
    job running or aborted
    ENDIF.
    ENDFUNCTION.
    Eg:2
    Use the following procedure to create a function module
    1.From the ABAP/4 Development Workbench screen, press the Function Library button on the Application toolbar.
    2.Type the name of your function module in the Function Module field. The name must begin with Y_ or Z_.
    3.Press the Create button. The Function Module Create: Administration screen is shown
    4.Type the name of a function group in the Function Group field. The function group name must be four characters long and must begin with Y or Z.
    5.Type an S in the Application field. This field is used to indicate which function area uses the function module. Our functionality is not used by any functional area, it is simply an example, so any choice will do. (S indicates that the function module contains functionality needed by Basis.)
    6.Type a description of the function module in the Short Text field. The contents of this field are seen when displaying a list of function modules.
    Press the Save button on the Application toolbar.
    7.If the function group does not already exist, a pop-up informs you of that fact and asks you if you want to create it. Press the Yes button to create the function group. The Create Function Group dialog box appears. Type a description in the Short Text field and press the Save button. The Create Object Catalog Entry screen appears. Press the Local Object button. You are returned to the Function Module Change: Administration screen.
    8.Press the Source Code button on the Application toolbar. The Function Module Edit screen is displayed.
    9.Type the source code for your function module. Do not change the system-generated comment lines under any circumstances! Your function module might fail to operate if you do.
    10.Press the Save button on the Application toolbar. The message Program xxxxx saved appears in the status bar at the bottom of the window.
    11.Press the Back button on the Application toolbar. You are returned to the Function Library Initial screen.
    12.If you want to define import or export parameters, select the Import/Export Parameter Interface radio button. Press the Change pushbutton. You are shown the Import/Export Parameters screen (refer to Figure 19.6). Type the names of your parameters in the first column and enter any other desired characteristics for each parameter. When you are finished, press the Save button and then the Back button.
    13.Finally, to activate your function module, press the Activate button on the Application toolbar of the Function Library Initial Screen.
    http://www.erpgenie.com/abap/bapi/example.htm

Maybe you are looking for

  • Cisco css http keepalive is not working with GET command

    Dear all i have Cisco Css connected to Dell Server (via switch) Cisco CSS - 192.168.1.3 and Dell Server - 192.168.1.5 Dell server is setup with windows 2009R2 and Apache HTTPD is version 2.2 This server is dedicated to host multiple doamins with Apac

  • [KVM] Live Snapshots

    There's a new section now in KVM wiki: https://wiki.archlinux.org/index.php/Kvm#Live_snapshots Newer KVM and Libvirt allows to snapshot or backup a running virtual machine without downtime. KVM users, have you used it yet?

  • Music wont play more than a few seconds on some songs

    Some of my songs wont play more than a few seconds and some only 30 seconds when i play in WMP they play fine Purchased at amazon.com i have tried deleting and re adding file plays in windows media player fully

  • My MacBook wont shut down!

    My 13" MacBook does not power down. Every time I power down, it quits the programs and the screen freezes with the wallpaper still showing. If left alone it stays at that position for hours. I have to push the power button to power it down. What is w

  • Superdrive Install on Sawtooth ~~ Firmware Problems?

    Greetings all, Installing a brandy spankin new Pioneer DVR-112D into my Sawtooth AGP G4 after the stock opti-drive quit. Got the drive "installed" physically, but OSX doesn't recognize it or any discs in it. Been googling for hours with no answer so