Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
Hi everyone
Does anyone think of it because it takes so long to make a color change of the selected surfaces, using this macro? How can I speed it up?
thanks
FOREACH $Mod IN FOLDER('model') { IF number_selected($entity('model',$Mod.name).components) > 0 { EDIT MODEL $Mod.name COLOUR RGB 1.00000 0.50196 0.00000 } }
Solved! Go to Solution.
I'm unable to do any tests right now but, off the top of my head, what might speed this up is to disable the graphics updating at the beginning of the macro and enable it again at the end. It does exactly as it sounds, it won't show any changes to the screen while the macro is running and only shows the final results once it's turned back on.
To turn off and on the graphics use:
// Stop the screen from updating while we do a lengthy process GRAPHICS UNLOCK // We're all done so tell PowerMILL it can update itself GRAPHICS LOCK
Hopefully that will speed it up since it won't have to redraw the viewport for each surface selected.
I'm an idiot. I got the above reversed. "GRAPHICS LOCK" stops the viewport from updating and "GRAPHICS UNLOCK" allows the viewport to update.
Sorry about that!
oh yeah....
its a perfect, thnaks
GRAPHICS LOCK FOREACH $Mod IN FOLDER('model') { IF number_selected($entity('model',$Mod.name).components) > 0 { EDIT MODEL $Mod.name COLOUR RGB 0.00000 0.50196 0.75294 } } GRAPHICS UNLOCK message info "Fin color"
Can't find what you're looking for? Ask the community or share your knowledge.