Adding objects into a group/component
-
@croviax said:
I'm sorry, but how do i use that script?
It's not a script it's a snippet of code...
Sorry I thought you wanted a Ruby way of doing it...
To do it by hand do this.
Select the Object[s] you want to relocate into the Group.
Use
Menu > Edit > Cut
The selection is put it onto the clipboard.
Double-click the Group so you are editing its entities.
Use
Menu > Edit > Paste-in-Place
The Selected Object[s] now 'moves' into the Group.
To duplicate it into the Group use
Menu > Edit > Copy
To place it into the Group at the same location use the
Menu > Edit > Paste-in-Place
BUT to choose where to put it use
Menu > Edit > Paste
You then pick its new location inside the Group.
To 'move' something out of a Group reverse the process...
Edit the Group.
Select the Objects to 'move' out.
Menu > Edit > Cut
The exit the edit and then
Menu > Edit > Paste-in-Place
To put into the Model... or edit another Group and paste the objects into that etc...
To 'copy' things rather than 'move' their context useEdit > Copy
rather thanEdit > Cut
You can do something similar with a Component Instance Edit - to add/move objects etc. -
Hahah, didn't know the 'Paste in Place' command exist..
Thanks a lot
-
@croviax said:
Hahah, didn't know the 'Paste in Place' command exist..
Thanks a lot
This may be a helpful hint, you can customize your shortcuts on your keyboard, by going to window/preferences then pick short cuts from the menu and set your "paste in place" command to e.g.: "Ctrl-shift-v". I don't know why this isn't in the default settings???
Also use the common shortcuts such as Ctrl-C for copy and Ctrl-v for paste. I can't remember if sketchup does the Ctrl-d for duplicate.make any sense?
-
You can also drag a group into another group in the outliner window.
Something similar is explained in this video: http://www.youtube.com/watch?v=7OBljxmDLSI -
Thanks TIG and Pyroluna! ...I don't know why these aren't mentioned on the SketchUp doc pages about groups & components; you'd think it would be an obvious followup concern...
-
WOW Tig, genius, you are the the man, so obvious but never thought of that
Thanks
-
This thread is still saving the minds of new SketchUp users!
Thanks for the clear explanation and direction. -
Hi , how to add an item to an existing component instances. I mean I have 4 copies of an item in my model , 3 are instances of a component but the forth , for some reason , is not. How do I make it part of the component instances.
-
I can attest to the copy and paste in place. Works wonders. However, if there is a lot of geometry that needs to be added, I'd recommend using the outliner and dragging them in there!
-
@tig said:
Try
group.entities.add_instance(other_group.entities.parent, other_group.transformation*group.transformation) other_group.entities.parent.instances[1].material=other_group.material other_group.entities.parent.instances[1].layer=other_group.layer
### you can also copy over other attributes of 'other_group' if appropriate
other_group.erase!
'other_group' is 'cloned' into 'group.entities' and the original erased - here we also copy its material and layer...
Thanks for this. Was useful.
Of course, assigning names (variables) to each instance, makes copying layer straightforward;
group2.layer = group1.layer
Advertisement