...
Code Block |
---|
{ messageName: "nameOfTheMessage", ... } |
Supported messages
runcommand
Run a command in Kudo:
where resultMessage: if specified, the message is posted to the iframe parent when command execution is done and messageId: if specified, it is passed to resultMessage
...
Info |
---|
Note: Only whitelisted commands are allowed to be run from the client side by runcommand message. To whitelist a command, add it to Default Files\OEM Commands\commands.xml |
Code Block | ||
---|---|---|
| ||
<?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:
...
Code Block | ||
---|---|---|
| ||
var message = { messageName: "runlisp", lispExpression: "lispExpression", resultMessage: "nameOfPostedResultMessage", //optional messageId: "messageId"; //optional } window.postMessage(message, '*'); |
eventRegister/eventDeRegister
Event types: commandEvent, sysVarEvent, lispEvent, drawingEvent, selectionEvent, drawingModifiedEvent
You can find available events on the event page. See https://graebert.atlassian.net/wiki/x/QAFdRg page for more details about events.
eventRegister
Register for receiving different types of additional events notifications.
...
Code Block | ||
---|---|---|
| ||
var message = { messageName: "eventRegister", eventName: "commandEvent";//one of the above event types } window.postMessage(message, '*'); |
eventDeRegister
Deregister to stop receiving different types of additional events notifications.
...
Code Block | ||
---|---|---|
| ||
var message = { messageName: "eventDeRegister", eventName: "commandEvent";//one of the above event types } window.postMessage(message, '*'); |
Upgrading/Downgrading
Upgrading: To change from View mode to Edit mode
...
Code Block | ||
---|---|---|
| ||
var message={ messageName= “stateChanged”, state = “view”; } window.postMessage(message, '*'); |
setvariable **
Info |
---|
Change a variable value |
drawingdescription**
Info |
---|
Trigger creation of drawing description |