XMetaL Tips and Tricks

XMetaL Community Forum XMetaL Tips and Tricks script example: web service call from resource manager in XMetaL Author

  • murray

    script example: web service call from resource manager in XMetaL Author

    Participants 0
    Replies 1
    Last Activity 13 years, 4 months ago

    Attached is some sample script to make a web service call from the resource manager in XMetaL Author and then insert the data returned by the call into a document open in XMetaL Author.

    Files in the zip:
    – Readme.txt: information on the script code and how to install it.
    – resManTest.mcr: macro to load an html page in the resource manager.
    – resManTest.html: the html page that is loaded in the resource manager.

    The following is the information in the Readme file:

    Prototype
    ———
    A web page displayed in the resource manager makes a call to a web server and then inserts content from the server in the document open in XMetaL Author.

    Installation
    ————
    1) copy the resManTest.mcr file to the Startup folder in XMetaL Author
    2) copy the resManTest.html file to the Forms folder in XMetaL Author
    If running a version of XMetaL Author that is different from 5.5, you will need to edit the resManTest.mcr file and change the path to the resManTest.html file that is in the WebService.navigate() call.

    Operation
    ———
    On startup, the resManTest.mcr file is loaded. It has a macro that is executed when XMetaL Author finishes it's start up routine. The macro opens the resource manager in XMetaL Author if it is not open already, removes the Assets and Desktop tabs, adds a new tab called Web Service and tells XMetaL Author to run Internet Explorer in the tab and display the resManTest.html file.
    The “insert time” button on the html page calls a javascript function that makes an ajax call to a web server to retrieve the current time and then it uses the XMetaL API to insert the time in the active document in XMetaL Author.

    Thanks
    Murray

    Reply

    murray

    Reply to: script example: web service call from resource manager in XMetaL Author

    The example in this posting may also be of use to people wanting to make web service calls from XMetaL Author. It makes a call from script rather than a web page in the resource manager.

    http://forums.xmetal.com/index.php/topic,514.0.html

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support