構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
AfterCreateModelingNode
community documentation adoscript trigger
答え
14/04/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
答え
14/04/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}