Change the color of all styles by a script

 From:  Michael Gibson
2987.5 In reply to 2987.4 
Hi crydee, yup it's possible to set those up.

To set up a shortcut for "Add new style", use this as the command:

script: /* Open Add new style dialog */ var gd = moi.geometryDatabase; gd.styleEditorOpened(); var dialog = moi.ui.createDialog( 'EditStyleDialog.htm?titleid=Add style dialog title&index=-1', '', moi.ui.mainWindow ); if ( dialog.window.doModal() != -1 ) { var styles = gd.getObjectStyles(); if ( styles.length > 0 ) moi.ui.propertiesPanel.editStyleIndex( styles.length - 1 ); } gd.styleEditorClosed();


To set up a shortcut for the "Edit styles" dialog, use this as the command:

script: /* Open Edit styles dialog */ var dialog = moi.ui.createDialog( 'EditStylesDialog.htm', 'resizeable,defaultWidth:380,defaultHeight:420', moi.ui.mainWindow ); dialog.window.doModal();


Hopefully that will get you wrangling your styles quickly... :)

- Michael