In a block insert I can select “CTRL+SHIFT” nested entities but it seams there’s no way to extract then.
I know I can “open and edit” the block and copy paste from there but that’s impractical for large linked blocks.
In my particular case I’m linking a large topographic plan and sometimes I wan’t to copy some polyline but having to open this large drawing in a new rhino instance just to do that is overkill.
Another problem is that the insert is positioned differently so I would have to realign the pasted objects.
Its a pity if there’s no better way to do this since we can already select nested entities.
Is there a simpler way to copy a nested entity???
What I usually do with large blocks is to copy it in place and explode.You’ll get all the objects of the block selected. Now just deselect the curves you need and hit Delete to delete the rest. Its a lot faster than BlockEdit huge files.
I’ve attached a zip file with 3 rhinoscripts. DirectObjectsBlockAccess.zip
Unzip it to a folder where you can keep them and drag&drop each file over Rhino.
It will register an alias that will run the script.
ExtractObjectsFromBlock.rvb: copy-extract objects from a block.
AddObjectsToBlock.rvb : add object to the selected block
DeleteObjectsFromBlock.rvb : delete/remove objects from a block
Note that these scripts are presented “as is”, make sure to if needed
double check results and operate on non-critical files.
@Pascal I think these should be default commands/functionality for V6.
Blockedit it too tedious for many block manipulations.
Personally, I’d rather have them open in a text editor, as I am always opening rvb’s to look at or modify… But most users would rather not, I guess. I did notice that all the plug-in icons went black as well…
–Mitch
Hmph… network issues… I responded to this multiple times with no result, then they all showed up at once. I tried to delete, hopefully that worked. At any rate, the question I have, Willem, is how should nested blocks be handled?
-Pascal
Good question,
I’m not that much into Blocks but my first thought is to handle them as blocks:
To me going into block edit is just like going down one level. So if on that level I encounter another Block
I can go down again. With my scripts I think I can run blockedit and once on the level of that block I can operate on blocks that are inside that block.
BlockEdit is good to “manage” the Block, see the nested Blocks and their structure.
If I want to edit things like the geometry inside, add or remove objects, the blockedit dialog is just dead weight.
Blockedit should remain in it’s functionality, but I suggest to have additional tools to do quick edits
ExtractObjectsFromBlock
AddObjectsToBlock
DeleteObjectsFromBlock
I can imagine sub-selection working as well, yet a warning should be in place to inform that a block definition is edited and not just some random (grouped) set of geometry.
@pascal Are there any changes to be expected on this matter for V7?
For instance, it would be nice to have a DupBlockEdge or DupBlockCurve command. When working on a large linked DWGs for buildings/ urban plans this is much more convenient that duplicating the DWG, exploding it and erasing any other curve.
As to nested blocks, I would expect any entity to be selectable for the entire chain down. Any curve ( and or edge/ surface) under the cursor should be accessible so that you won’t have to edit any of the (nested) blocks.
Hello - BlockEdit should be a shorter way to get there for now - copy objects or edges etc., select them click RemoveObject, then exit the block editor.
Hello- by ‘extract’ do you mean remove or have a copy of the object extracted at each block instance? If the former,use BlockEdit on any instance to remove or delete objects from a block definition.
Hello- so, if you have 500 block instances containing a box and a sphere, you need each block instance, as is, but at the same locations, a copy of say, the sphere, as a normal non-block object, correct?
Here’s a Python that should do what you need, if I understand… it is a bit quick and dirty.
Let me have a look… @simplex.aa I guess that will be tricky - unless you know for sure that you will never want a nested block instance itself to be among the copied objects(?)
This one will let you do that - that is no nested block instances are left to choose from the original top level block instance, only the contents of these: CopyOutsideOfInstances.py (1.4 KB)
I can also let you copy the objects out of an instance first on your own and then run the script - the first attempt was set up that way but it seems messier as a workflow.