Programmatically modify ActiveX/COM-step module settings

Would like to modify programmatically ActiveX/COM-step module settings (Automation Server, Object reference, Object class, method/property, parameters-list).
Can't find this in context. How this can be modified?
Thanks!
Solved!
Go to Solution.

Hey bestware,
You need to get a reference to the step: RunState.Sequence.Main["MyActiveXStep"]
Then you can use that to convert to the ActiveX module: RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule
Once you have that you can do whatever you'd like with it.  You can read in the help more about this.  Search for ActiveXModule.
You sould see all sorts of properties: MemberType, MemberName, ServerID, ActiveXReferenceExpr.  If you read about them they are refering to the different things you want to set.  For instance the ActiveXReferenceExpr is where you store the Object Reference.  The MemberType is Call Method (1), Get Property(2), Set Property(4) or Don't Call(-1), etc... 
So to change the step to be a Get Property step I would do this:
RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule.MemberType = 2
To store an Object Reference to Locals.MyObj I would do this:
RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule.ActiveXReferenceExpr = "Locals.MyObj"
Hope this gets you pointed in the right direction. 
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~

Similar Messages

  • Programmatically Insert ActiveX/COM Step Using LabVIEW

    Hi,
    I would like to be able to create sequences like the one attached, using LabVIEW.
    This sequence has only 2 steps, a LabVIEW VI call, and an ActiveX/COM Adapter Call.
    I have been able to do this using an adaptation of the code here: https://decibel.ni.com/content/docs/DOC-36337
    However, I am struggling to add the ActiveX/COM step.
    Any help would be gratefully received.
    Thanks,
    Dan
    CLD
    Solved!
    Go to Solution.
    Attachments:
    Valve Control - Test 1.seq ‏6 KB

    Obviously there is a way if you look for it
    Since you have an existing object of the "Step" class you can also get a "Module" object for it. Afterwards you have to specify that this is an ActiveX module. If you do not know that - probably you need to get it from the "Adapter" object somehow... Our case is simplier, so you just cast it to the ActiveX module and ... set some properties like ServerId, ActiveXReferenceExpr and so on.
    I have attached an example for you. Interesting thing is the ServerId - I have just read this chain from the TS for similar step and reused it here so don't ask me how to obtain it automatically
    You still have to fill your "Properties" like "file" - but I will graciously leave this job for you =
    Best Regards,
    CLA, CTD, CLED @ Test & Measurements Solutions Poland
    Attachments:
    ActiveX Step_2.vi ‏24 KB

  • Step Type ActiveX/COM

    Hi!
    I want to know what is exactly ActiveX/COM step Type. I don't know what kind of program produce this type of step.
    Thanks
    Capblans

    Hi,
    You would use these step type to interface to the methods and properties of an activex/com object.
    Tpyically you would use this step type to interface with the TestStand API methods and properties. Also code generated using Visual Basic.
    There is a couple of articles (application notes) here that maybe helpful.
    Within the TestStand\examples folders and on the NI website are examples using the ActiveX/COM adapter
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Setting format and format options in Output module settings for render queue item

    Hello,
    I am unable to set the "Format" and "Format options" for video in output module settings programatically using After effects apis.
    I referred the after effects cs3 sdk guide for the apis.
    I find apis for all other options in the "outputmodule settings " like :
    AEGP_SetEmbedOptions
    AEGP_SetOutputChannels
    AEGP_SetStretchInfo
    AEGP_SetSoundFormatInfo
    But there is no api listed for setting the options available in the "Format" tab and "Format options" tab.
    The "Format" tab and "Format options" tab is available in the dialog that opens when user clicks on the Output module settings for the render queue item.
    The format tab when clicked shows a drop down list with aff different formats. By default "Video for Windows" is set.
    The drop down list contains following format options
    Adobe Clip Notes
    Adobe Flash video
    Quicktime movie
    Video for Windows
    I need to be able to set the "Quicktime movie" option in the Format tab programmatically and then set the compression type as "Animation" in the compression settings programatically using the api functions available in AE CS3 SDK
    Please suggest the suitable api to do so.
    I need to write my own plugin to export to Quicktime movie using the after effects apis.
    I follow below steps to do so.
    1. AEGP_InsertMenuCommand and add export option to AE with my own plugin name
    2. In the command hook, select active item using AEGP_GetActiveItem
    3. Add it to render queue
    4. Set the output module settings for 0 th output module using
    suites.OutputModuleSuite1()
    5. Use different functions from suites.OutputModuleSuite1() to set the output module settings like EmbedOptions,StrechInfo etc.
    6. Till this step, I am doing it right. But I am not able to find any api for setting Format options using suites.OutputModuleSuite1()
    I also checked all other suites available for setting FormatOptions but no luck.
    Please help.
    Thanks,
    -Namita

    Hi Namita,
    I am experiencing the same problem.
    I am using AE CC SDK, and I am unable to change the outputmodule format to any of the other movie format types (mov, mpg, flv, etc.).
    It is always set to "avi"
    I even compiled and ran the Queuebert example in the SDK, and there I get the same problem: the path extension is always left on ".avi"
    Does anyone know how to change this?

  • How to conect to remote ActiveX (COM) program

    Hi everybody.
    I want to comunicate between LabView and another program by using ActiveX (COM).
    If both - LabView and the other program is at my local machine - everything is fine.
    I use the "Automation Open"-VI to open the ActiveX conection.
    The problem is that if the other program is located at another PC (inside network) the "automation Open" -VI returns an error.
    How can I get an ActiveX connection to the other PC?
    Thanks for help.
    Best regards.
    RonnyMessage Edited by rfriedr1 on 05-23-2005 10:00 AM

    I'm afraid it isn't quite that easy. From LV all you need to do is specify the machine name to get the remote access. However, in order for that to work, all of the COM stuff must be configured correctly for remote access (DCOM) and all the security settings must be done correctly. And if you are running XP SP2 or 2003 Server, there are additional steps to take because those OS's have tightened up security and thus have additional steps to get it to work.
    SUMMARY
    =======
    If you don't know much about COM or don't have access to a COM guru that created the COM component you are trying to use, you might want to think about creating a little LV app that runs on the remote box and then use LV networking to remotely access it. DCOM isn't impossible, but it isn't easy - especially if you don't have a good grounding in non-LV COM interfacing.
    DETAILS
    =======
    Is the COM object you are trying to access a home grown one or 3rd party? Are the two computers both in the same NT Domain or are they in Workgroup configuration? DCOM uses NT security and thus you typically need to have both computers in the same domain and using a domain credential for communication.
    I'm afraid I can't give you step by step instructions on how to do this (I haven't needed to use DCOM in about 6 years) - but there are a lot of resources out on the web and books like Don Box's "Essential COM" walk you through most of it. For example, here are some references to look at
    http://support.microsoft.com/kb/176799/EN-US/
    http://support.microsoft.com/kb/158508/EN-US/
    Oh, and this might be handy - ran across this while looking for links for you...
    http://support.microsoft.com/default.aspx?scid=kb;en-us;249726
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to get the entry point in the ActiveX/COM adaptor

    below is the description of the Demo of using the ActiveX/COM to call new seq . 
    API Demo
    1. Manually add a Message Popup step to the MainSequence of a
    new sequence file. Save the sequence file as launch.seq.
    2. Create another sequence file and save the file as caller.seq.
    3. In the MainSequence of the caller.seq file, add Action steps
    using the ActiveX/COM Adapter to call into the TestStand API and
    launch the launch.seq file in a new execution.You might need the
    following two methods to complete this step.
    . Engine.GetSequenceFileEx
    . Engine.NewExecution
    so the question as follows:
    1.i call the method of get sequencefileEx
    2. call the method of getmodlesequenceFile
    3.call the method of evalEntryPointNameExpression
    4.call the method of NewExecution.
    but at the step of 3. i haven't get the entry point.
    so how to solve this issue? thanks
    Attachments:
    QQ图片20140115200924.jpg ‏58 KB
    QQ图片20140115201708.jpg ‏100 KB

    This is a duplicate post of this:
    http://forums.ni.com/t5/NI-TestStand/How-to-get-the-entry-point-in-the-ActiveX-COM-adaptor/m-p/27005...

  • Where-Used List: Modifying SAP standard function module

    Hi,
    We have decided to modify SAP standard function module SD_SCHEDULING. But before that, we need to understand what impact this modification will have in the system. We will also estimate the risks with this modification.
    Therefore, I have taken Where-Used List for this function module. We are aware that this list is not comprehensive.
    Do you know any other way we could use to understand better what impacts this kind of modification may have? My colleagues say that this is the only way.
    Thanks in advance for your help.
    Regards,
    Jarmo Tuominen

    Hi Jarmo,
    Try this
    1). Goto Se16 and check the contents of table 'CROSS'.
    2). Enter 'F' in the first selection screen field
    3). In the NAME field enter the Function module SD_SCHEDULING and execute.
    4). The list will give you where all the FM has been used.
    Kindly note this is almost the same as doing a where used list. The where used list will only work correctly if the 'Update Navigation Index' works correctly in your system. So just to ensure the result of your where used list you can follow the above steps. This does not require the Update Navigation Index.
    Hope this helps
    Cheers
    VJ

  • Output module settings in AE disappears when activating Creative Cloud

    I have been using Creative Cloud a little year now. Sometimes one of the programs en the suite asks me to activate the software. Then I (again) type in my adobe id.
    After that the output module settings in After Effects disappears and I have to rebuild them manually. Very annoying.
    Why am I asked to activate? And where do the settings go?

    HI Blues67,
    Sorry to hear about your difficulties. I've experienced the reactivate behavior and it is something I know we are working to improve. I haven't experienced the output module issue before. I searched the After Effects forum for "output module" and read through all the posts and didn't see similar reports from other customers, so wondered if it was something unique. I think the the output module preferences are saved as part of the regular After Effects user preferences. I wondered if you were on Windows or Mac. If you've had to reset your user preferences that might account for the output module settings being reset too. I'd test recreating them by moving the original to a new location, and if they do get reset, you can save a backup for future reference if needed. I think
    you can get more info about the location from here:
    http://help.adobe.com/en_US/aftereffects/cs/using/WS37cb61f8f3397d86-164c9f19127035dd253-8 000.html
    -Dave

  • Repeated Formats in Output Module Settings

    If I click on Output Module in the Render Queue and pull down "Format" to change it from say, a JPG to a Quicktime movie, why is it that each format is repeated twice? I'm runnning CS3 on Vista.
    Now, to be clear - my TEMPLATES aren't repeated .. just the FORMATS listed for what the templates could be.
    Adobe Clip Notes
    Adobe Clip Notes
    Adobe Flash Video
    Adobe Flash Video.
    H.264
    H.264
    Windows Media
    Windows Media
    You get the idea.
    Thanks
    Marc

    Mmh, still strange. Even if it looks harmless, it may cause issues eventually, if AE attempts to also load a specific output module twice. I'd keep an eye out for it. I forgot to mention that some of these modules also are hooked in the registry, so may be that's where this nonsense comes from - identical settings under different keys or redundant user-specific vs. systemwide keys.
    Mylenium

  • Python ActiveX/COM - Which engine am I getting?

    Currently, I have TestStand calling some Python code to run some of our tests.  I'm wondering if it's possible to have the Python code manipulate variables from the running TestStand instance?  This post shows how to access the TestStand API from Python: http://forums.ni.com/t5/NI-TestStand/Exchange-data-with-TestStand-from-a-python-thread/m-p/1314571#M...
    Based on what I've read, it seems that when you get a handle on an ActiveX/COM Engine object, its not the same Engine as is currently running (that called the python script).  (see post 6 of this post: http://forums.ni.com/t5/NI-TestStand/using-C-as-User-Interface-in-TestStand/m-p/1404192#M31492).  
    If this is true, then the engine I get in Python isn't the engine I want.
    Can anybody confirm/deny?

    Ok. Probably the easiest way to pass a reference across processes is to use the TestStand synchronization step types and corresponding synchronization manager API. On the TestStand side, before launching your python process, create a queue or notification (using the corresponding synchronization step type), giving it a name that begins with an '*' character. Synchronization objects whose name begins with an '*' character are global per machine. Then before, launching your python app, either enqueue the reference you wish to pass to python or set the notification with such a reference. Then inside of your python code, create a new instance of the engine, and call GetSyncManager() on it with the name you used for your queue or notification. You also need to import the TestStand synchronization manager type library, which will then allow you to convert the sync manager reference to a SyncManager data type. Call GetQueue or GetNotification on it, then call the corresponding method on the queue or notification to dequeue or wait for the notification. You will need to create a destination object using the engine as follows: engine.NewPropertyObject(PropValType_Reference, false, "", 0). See the API help for teststand for more information.
    Hope this helps,
    -Doug

  • Comment utiliser le bouton grisé ? dans l'editeur ActiveX/COM?

    bonjour,
    je souhaiterais associer une aide à chacun de mes "steps" dans l'éditeur d'ActiveX/COM. Il y a un bouton "?" grisé et je veux le rendre actif.
    Comment créer le lien entre ce bouton, le fichier d'aide et ma "Method"?
    J'ai cherché sur le forum et j'ai trouvé un seul cas identique et sans réponse pour l'instant "Add Documentation to custom DLL-Teststeps".
    merci pour votre aide.
    P.F
    Solved!
    Go to Solution.

    I do not know French that well, but I know the answer to your question so hopefully someone can translate this for you if needed.
    Basically what you need to do is add a helpfile tag and helpcontext and/or helpstring tags to the library, methods, and interfaces in your COM object's type library. If you are using C++ and an .idl file it looks something like this:
    At the top of your idl file:
        uuid(LibraryGUID),
        version(1.0),
        helpstring("Help string"),
        helpfile("..\\Doc\\Help\\TSAPIRef.chm")
    library libraryName
    For each interface:
        [helpcontext(HlpIDConstant) ,helpstring(HelpString) ,
            uuid(InterfaceGUID),
            dual,
            pointer_default(unique)
        interface MyInterface : IDispatch
    For each method:
            [helpcontext(HlpIDConstant) ,helpstring(HelpString), id(642)] HRESULT                MyMethod();
     Hope this helps,
    -Doug
    Message Edited by dug9000 on 06-19-2009 11:49 AM

  • Step by step configuration settings in mm

    Hi to all,
    may i get step by step configuration settings in mm,
    plz. forward to my mail id - "[email protected]"
    Regards,
    Sailaja.

    Hi,
    You can go through this links which will give idea on SAP MM configuration.Click on the each to understand the steps.
    http://sap-img.com/sap-mm.htm
    http://sap123.com/
    rgds
    Chidanand

  • It is possible to programmatically disable the "Executing Code Modules in an External Instance of CVI" feature?

    It is possible to programmatically disable the "Executing Code Modules in an External Instance of CVI" feature within a CVI project?
    I know how to do it manually (Configure > Adapters... > Adapter Configuration).
    Thanks in advance,
    --M

    Yes. TestStand 2.0 added the Engine.CVIAdapter_ExecuteStepsInCVI property.

  • Programmatically modify package body source

    Hi,
    I need to write a java programm or a script that will allow me to programmatically modify the sources of all packages from several schemas.
    We need to do something similar to a search/replace in the source code of the package bodies from several schemas. Is there a way to do that ? Where should I modify the code ?
    Thank you.
    p.s. I can connect as sys.

    In PL/SQL, you can use the dbms_metadata package to get the ddl to replace the package, transform it with regexp_translate or your own procedure (substr, instr, ...), then execute.
    Regards
    Laurent

  • Programmatically modify frame color

    I need to programmatically modify the frame color for a slider control.
    I'm able to do this while developing through "Customize control" (see attachment), but I don't know how to do this during runtime.
    I think I need a reference to the cosmetic element that represent the frame. Is there a way to do this?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded
    Attachments:
    slider.vi ‏6 KB

    I can modify the housing color for modern controls too, but the frame is a different element.
    I've just added a new idea in Idea Exchange Forum
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

Maybe you are looking for