I am working on the importing of about 40 000 STP files. I need to change the mesh setting from initially 0.6 to 1, cut away certain parts, fillet sections etc and save them later as *.3dm.
This button I created (inlc. the script) is just a routine to save a few clicks for me
Absolutly!
If I could include this manual change into the script as well, it would help to eliminate another few manual steps. I just dont know how. I never scripted before. Those are my first few baby steps
Well, if you are importing files, the display mesh only needs to be set once when you initially create the blank file for the import. You can also create a custom template file that already has that setting in it. So I feel this is relatively unnecessary for every import. If you needed a button to do this once, you could macro:
You can also control any of the other custom mesh settings this way, run the dash version of DocumentProperties > Mesh > Custom and see what you can set on the command line.
Mitch,
Thank you and it already gets me a step close. Unfortunately I does not solve my initial problem of executing a different scrip than written in my script of my button
Maybe I need to elaborate a little bit more.
I am pulling STP files from your ProFile server. Those files are production files and are lacking of important geometries for marking purposes (renderings are made from those files). I am adding those geometries in Rhino, after I simply dragged the STP file into Rhino. I don’t want to use a generic Blanco file to drag the STP file into, because I want to maintain the file name and location when I save otherwise I would have to manually write the file name and cut and past the file location when I simply save the newly created *.3dm
When I save a file, It needs to be shaded before with a mesh density of 1 to proceed faster and better tessilation to my renderer.
OK, yes, unfortunately, when you drag and drop a file, Rhino uses a hard-coded template setting - don’t know why that is actually - so you cannot pre-set the mesh settings as you can using a template file. The macro posted above will work for setting the mesh density after opening the file, to change it to 1 it would be
-_DocumentProperties _Mesh _Custom _Density=1.0 _Enter _Enter
I don’t know why you are needing to explode and rejoin your objects as per your original script…
Ah, OK. I might try the _ExplodeBlock command (_AllBlocks option) to see if it works for you - might go faster?
So a macro might be:
(run after drag and drop open file) -_DocumentProperties _Mesh _Custom _Density=1.0 _Enter _Enter _ExplodeBlock _AllBlocks
If you want to save the file automatically, you can add:
_-Save _Enter
to the macro, but attention, that will save the file in the current directory, and if there is an existing file with that name it will overwrite it without a warning. Otherwise, you can just add _Save (no dash) and let the dialog come up.