V4 released!

 From:  Booleano
10083.160 In reply to 10083.157 
Hi Michael.

Once again, thank you very much for your invaluable help.
I have modified my custom window, only with the extra tools that are not in MOI.
But it would be great if you could include in this window, icons that run a script (Scrip1,Scrip2,Scrip3).
And it would look like the attached image (can I do any icon design instead of the "?" Signs).

What code should I use, and in what type of file to write it.
For example, how to put this script:
script: / * Create a style for each object name * / var AllObjects = moi.geometryDatabase.getObjects (); var NamedObjects = new Object (); for (var i = 0; i <AllObjects.length; ++ i) {var Obj = AllObjects.item (i); if (Obj.name! = '') {if (! NamedObjects [Obj.name]) {NamedObjects [Obj.name] = new Array (); } NamedObjects [Obj.name] .push (Obj); }} for (var Name in NamedObjects) {var style = moi.geometryDatabase.findStyle (Name, true); var Objects = NamedObjects [Name]; for (var i = 0; i <Objects.length; ++ i) {Objects [i] .styleIndex = style.index; var SubObjects = Objects [i] .getSubObjects (); for (var j = 0; j <SubObjects.length; ++ j) {SubObjects.item (j) .styleIndex = style.index; }}}


EDITED: 20 May 2021 by BOOLEANO

Attachments: