Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 11

Thread: Message control via VSTA

  1. #1

    Default Message control via VSTA

    Hello,

    We would like to use the Message Control module from VSTA. In VSTA we want to set the recipient, the message and send this message. We would like to know how to do this using VSTA and C#.

    Also we would like to be able to catch the acknowledge.

    Best Regards,

    Stephan de Wit
    Last edited by sldewit : 11th June 2010 at 08:48

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Message control via VSTA

    The module "Message control" is unfortunately not available at the COM-Interface (so not with C#/VB.NET or VBA).

    Regards,
    Herbert

  3. #3

    Default Re: Message control via VSTA

    Ok, but we already had a reply from the support desk of Copa-Data that we can change the function executing the send message command. According to BernhardF it should be possible in this way to change the recipient and text of this function.
    Last edited by bernhardf : 13th August 2010 at 17:20

  4. #4
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Message control via VSTA

    Of course - functions can be modified (regardless which module they belong) in the Runtime. But there is no direct access to the object model of Message Control via COM-Interface available (as it is for variables, pictures, drivers, RGM, ... and so on).

    In the Runtime you would
    - create an object of the function
    - modify the parameters of the function
    - execute the modified function

    To get the paramters (DynProperties) of a function you can either use the "DynPropertiesEnum" function or you simply export the function in the editor to .xml and are looking for the needed parameters which you want to modify.

    In this thread you can find an example on modifying RtFunctions via VBA:
    http://www.copadata.com/forums/showthread.php?p=3814

    The mechanism is the same in C#/VB.NET as with VBA.

    Regards,
    Herbert

  5. #5
    Join Date
    28.07.2008
    Posts
    64

    Default Re: Message control via VSTA

    In this thread you can find an example on modifying RtFunctions via VBA:
    http://www.copadata.com/forums/showthread.php?p=3814
    This is the same example with C#

      public void Macro_ChangePicFiler()
            {
                zenOn.IRtFunction myFunction = this.RtFunctions().Item("fct_Pic_TimeFiler");
    
                if (myFunction == null)
                {
                    System.Diagnostics.Debug.Print("Specified function does not exist");
                }
    
                myFunction.set_DynProperties("PictFilter[0].TimeFilter[0].ARVTime1",Convert.ToDateTime("01.06.2010 12:00:00"));
                myFunction.set_DynProperties("PictFilter[0].TimeFilter[0].ARVTime1", Convert.ToDateTime("05.06.2010 12:00:00"));
    
                myFunction.Start();
    
            }

  6. #6

    Default Re: Message control via VSTA

    I just found out how to change the message, but i'm still unable to find out how to change the recipient.
    Last edited by sldewit : 11th June 2010 at 10:15

  7. #7
    Join Date
    20.08.2009
    Posts
    293

    Default Re: Message control via VSTA

    Hi,

    the recipient is specified via the GUID, which means that you need to know the GUID of the recipients first.

    In your example the GUID (of the recipient defined in the editor) is:
    cf68488c-90e4-43b4-9b7c-6d71185dc182

    Regards,
    Bernhard

  8. #8

    Default Re: Message control via VSTA

    Ok, but this means that is not possible to change the actual phone number used here ? This needs to be pre-defined in Message Control module ?

  9. #9
    Join Date
    20.08.2009
    Posts
    293

    Default Re: Message control via VSTA

    Quote Originally Posted by sldewit View Post
    Ok, but this means that is not possible to change the actual phone number used here ? This needs to be pre-defined in Message Control module ?
    Yes, thats correct.

  10. #10

    Default Re: Message control via VSTA

    Quote Originally Posted by herberto View Post
    Of course - functions can be modified (regardless which module they belong) in the Runtime. But there is no direct access to the object model of Message Control via COM-Interface available (as it is for variables, pictures, drivers, RGM, ... and so on).

    In the Runtime you would
    - create an object of the function
    - modify the parameters of the function
    - execute the modified function

    To get the paramters (DynProperties) of a function you can either use the "DynPropertiesEnum" function or you simply export the function in the editor to .xml and are looking for the needed parameters which you want to modify.

    In this thread you can find an example on modifying RtFunctions via VBA:
    http://www.copadata.com/forums/showthread.php?p=3814

    The mechanism is the same in C#/VB.NET as with VBA.

    Regards,
    Herbert

    I've got a question about this. I would like to know how to change the dynamic property for the text in a message control send message function. I checked the XML file and saw that the dynamic property should be called "ConstText"So i wrote this code :

    this.RtFunctions().Item("fctDienstroosterSendSMS").set_DynProperties("ConstText", oMessage);

    This gives the error that this property isn't available. What am I doing wrong.

Similar Threads

  1. Message control menu
    By janlyndon in forum zenon Network
    Replies: 4
    Last Post: 2nd June 2010, 03:42
  2. Two questions about Message Control
    By lephis in forum zenon Network
    Replies: 1
    Last Post: 7th July 2009, 14:59
  3. Problems with Message Control
    By doppellhelix in forum zenon Network
    Replies: 1
    Last Post: 24th June 2008, 09:26
  4. Replies: 0
    Last Post: 27th September 2007, 13:17
  5. Replies: 0
    Last Post: 25th September 2007, 14:10

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •