How do I create an alias that changes object properties to desired settings or automatically make desired changes to any file opened

I print student generated files to a laser engraver (Universal laser systems). The laser engraver looks at print color and print width to control laser power/speed and whether it vector or raster engraves.

The problem I have is that often the Object properties are changed by students or by the program used to draw the file we are opening in rhino. It is tedious to selall>and then go through and change to the following:
Display color>by layer
Linetype>continuous
Print Color>by layer
Print Width>hairline

Is there any way that the above settings can be changed by written commands (so that I can create a macro) or a way to make these settings default for any file opened?

Sean, Montana State

Hi Sean,

I do the same thing here - Epilog laser, but the criteria are more or less the same. I have a 400+ line import script that looks at everything - object color, linewidth, linetype, looks for other bad stuff like surfaces, meshes, hatches, blocks, 3D objects etc. - it then fixes everything it can and reports what was fixed and if anything couldn’t be fixed…

You might get by with a macro here for the criteria you mentioned. Let me look for a second.

OK, this might work:

! -_Properties _Pause
_Object _Color _Layer
_Linetype Continuous
_PrintColor _Layer
_PrintLineWidth 0.01 !

Anything more sophisticated than that, I think a script will be better…

HTH, --Mitch

This works great, thanks Mitch. I have created a rudimentary button with your contribution that is working well for my student workers.

I’d love to see your entire script for fixing imported files, but if you are in the business of making money and would prefer to keep your trade secrets I would understand. My email is sean.clearwater@montana.edu if you would feel good about sharing it.

In any event, thank you.

I’m not in the business of making money with this stuff, I’m in education like yourself (for the next three weeks anyway). The thing is, the script is highly customized for our cutting procedures here, and includes a lot of stuff you probably don’t want or need and that will probably mess up your workflow… It’s also been somewhat hacked together over years and has grown to over 400 lines, which makes it a bit unwieldy to edit.

If you let me know via PM what kinds of stuff you want to detect and fix, maybe I can hack something together for you.

2 Likes