« Back

AfterCreateModelingNode

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
AfterCreateModelingNode
community documentation adoscript trigger
Answer
4/11/14 12:07 PM
I would like to know, how exactly the "origin" parameter works in the "AfterCreateModelingNode" event.

I would like to create a condition, where a window only pops up when the origin of a created instance is 0.

RE: AfterCreateModelingNode
Answer
4/11/14 12:08 PM as a reply to Anonymous.
The origin parameter is set as an integer parameter directly in the event and can be used to implement the scenario you describe. Please find a little code snipplet attached, the INFOBOX statement needs to be replaced with your code respectively
As for any other parameter available in an event, please consider that you need to create a local/global variable if you want to have access to the parameter in an externally implemented AdoScript file.

 1ON_EVENT "AfterCreateModelingNode" {
 2    IF (origin = 0) {
 3      CC "AdoScript" INFOBOX "DEMO: The object has been created manually"
 4    }
 5
 6    IF (origin = 1) {
 7      CC "AdoScript" INFOBOX "DEMO: The object has been pasted"
 8    }
 9}