Scripting Object Visibility?
 1-15  16-21

Previous
Next
 From:  Michael Gibson
11774.16 In reply to 11774.15 
Hi Shayne, try this version - instead of using selected objects it will use whatever solids are on style = gold whether selected or not.

And copies volume value to the clipboard.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shayno
11774.17 
Thanks Michael
works perfectly
and I changed my old _CVolume.htm to also copy to the clipboard

cheers
shayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shayno
11774.18 
Hi Michael
Similar to hide unhide by style
Is it possible to write script to hide / unhide by object name say 'old'
As I cad new rings next to old designs I constantly have to hide/unhide the old one to clear the screen
Moi Ver 4
kind regards
shayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11774.19 In reply to 11774.18 
Hi shayne,

re:
> Similar to hide unhide by style
> Is it possible to write script to hide / unhide by object name say 'old'

Try this one:

script: /* Toggle visibility of given name */ var name = 'old'; var item = moi.ui.sceneBrowser.objects.find( name ); if ( item ) { var any_hidden = false; var objs = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objs.length && !any_hidden; ++i ) { var obj = objs.item( i ); if ( obj.name == name && obj.hidden ) { any_hidden = true; } var subobjs = obj.getSubObjects(); for ( var j = 0; j < subobjs.length && !any_hidden; ++j ) { var subobj = subobjs.item(j); if ( subobj.name == name && subobj.hidden ) { any_hidden = true; } } } } if ( any_hidden ) { item.alterStatus( 'show' ); } else { item.alterStatus( 'hide' ); }

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shayno
11774.20 
Thanks Michael
I demonstrated and recommended your software to a business associate yesterday , I'm certain he will purchase it.
kind regards
shayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
11774.21 In reply to 11774.20 
re:
> I demonstrated and recommended your software to a business associate
> yesterday , I'm certain he will purchase it.

Thank you shayne! - Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-15  16-21