Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Messages (frame → iframe)

runcommand

Run a command in Kudo:

var message = {

    messageName: "runcommand",

    commandString: "_YourCommand",

    resultMessage: "nameOfPostedResultMessage", //optional

    messageId: "messageId" //optional

}

window.postMessage(message, '*');

You can also pass parameters to your command like this:

    commandString: "_YourCommand Param1 Param2"

or

    commandString: "_YourCommand\nParam1\nParam2"

resultMessage: if specified, message is posted to iframe parent when command execution is done

messageId: if specified, it is passed to resultMessage

Note: Only whitelisted commands are allowed to be run from client side by runcommand message. To whitelist a command, add it to Default Files\OEM Commands\commands.xml

<?xml version="1.0" encoding="UTF-8"?>

<commands>

<OEM name="graebert">

<command name="_XEREPLACEOPEN" />

<command name="_DOATTACHMENT"/>

<command name=" _YourCommand"/>

</OEM>

</commands>

runlisp

Execute the passed Lisp expression:

var message = {

    messageName: "runlisp",

    lispExpression: "lispExpression",

    resultMessage: "nameOfPostedResultMessage", //optional

    messageId: "messageId" //optional

}

window.postMessage(message, '*');

resultMessage: if specified, message is posted to iframe parent when lisp execution is done

messageId: if specified, it is passed to resultMessage

setvariable

Change a variable value

drawingdescription

Trigger creation of drawing description

  • No labels