I deleted by mistake the layer I was working on (no big deal) and suddenly none of the layers in the model was selected and I was suddenly able to create objects in the layer “By Parent”, which I found pretty useful feature when creating for example Blocks.
Is it possible to assign directly the layer By Parent to an object, or do I have to repeat the procedure explained above?
Or, is it possible to assign no layers before creating an object, in order to have it on this By parent layer?
Hi @clacortese,
I am so sorry this got buried. I was answering another question today on ByParent and found this was unhandled. I think it is good to reply and make sure there is an answer in case anyone else finds this thread.
You can do this before the objects are associated into a block or after in the BlockEdit command. You can also use this PY script for Rhino 8 to change ALL the properties of the contents of a block instance to ByParent. [test_byparent.py|attachment] BlockDefinitionByParent.py (2.5 KB) Download PY. RunPythonScript to load and run. (If you want something fancier version you can use PackageManager to download Dale’s Garage. And use the ScriptManager to access your scripts the easy way.)
You can download a file to test with here. block test.3dm (369.1 KB)
This is not possible. All objects need a layer assignment.
However, you can get close.
I use the AutoCAD Layer 0 concept. I will explain why below.
Make a Layer 0.
Assign some objects to Layer 0.
Assign their Color, Materials, Linetype, Print Color, Print Width, or Section Style Properties to ByParent.
Make a block from the geometry.
Insert the blocks on various layers with different color, materials and other properties.
The objects in the block that have Properties set to ByParent now will reflect those of the layer that the block is inserted on or are assigned to.
There is another important reason to do this if you export to DWG/DXF and use Layer 0 there.
When the DWG is written and opened in AutoCAD, the AutoCAD layer 0 behavior will now be active.
Since AutoCAD does not use the ByParent concept, with the use of Layer 0, we can get the Rhino “ByParent” behavior to translate to AutoCAD with this approach.
Let me know if this works for you!
Sincerely,
Mary Ann Fugier