組合檢視 平均檢視 瀏覽樹狀資料
相關串連 [ 前一個 | 下一個 ]
toggle
AfterCreateModelingNode
community documentation adoscript trigger
答覆
2014/4/11 下午 12:07
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
答覆
2014/4/11 下午 12:08 作為回覆給匿名
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}