Hey Gustavo, does it have to be a button ? If not, here's a very nice trick
from Jeremie Passerin:

var cp = ActiveSceneRoot.AddCustomProperty("MyCustomPSet", false );
var layout = cp.PPGLayout;
cp.AddParameter3("myBooleanParam", siBool);
item = layout.AddItem("myBooleanParam", "", "dscontrol")
item.SetAttribute("class", "button")
item.SetAttribute(siUICaption, "Toggle Button")
item.SetAttribute(siUIStyle, 0x00001003)
item.SetAttribute(siUINoLabel, true)
inspectObj(cp);

...then put your code under the "_OnChanged" callback.

Reply via email to