Components - Copy / Past as unique in place


#1

Hi, is there a way to do a copy a sub component and place in in the same container component as unique.

I have a component what got several components at the same sub level, and each sub component has his own layer. I want to copy a sub component and place it on another layer ( those layers are used to create a unique scene ).
If I could copy ( component ) and paste in place as unique (component) I will be very happy.
Is there a direct way to do this or should I write an piece of ruby for this?


#2

Is it necessary to nest them? Pasting the same definition would cause problems, I guess. If in a container, I would use a group for this, you wouldn’t have to worry about uniqness, but it kind of depends of what it is that you wish to accomplish
I would create a shortcut for paste in place, and when you have it on the clipboard, use that. It will be selected, so you can assign a layer to it and do the next


#3

I was thinking about that and the matter of fact I did in an earlier test… But in my case Certain element has to be a dynamic component because I would like to have that part draw it dynamically.
I will add a sample file. Deur_Binnen_Stomp.skp (154.3 KB)

I did create only one sub/sub/component as a sample. The rest are still groups, but some need to become a dynamic component. This because the door’s do have different width’s and height’s. But I think you could guess that.

At the end I will show them in a work skp file in a scene as a top view. And use that in LO in different scale drawings.

If you have more advise or tips then, they are welcome.


#4

Once wrapped in a component, you can add attributes to groups just as easy. I am on a phone, now, sp I could not investigate your file, will have a look at it tomorfow.
I guess you want the 2D representing the (scaled) 3D model of the deur? In that case, it should be easy to get that information from the top level deur and have a formula like LenX=LenY for the pie-group


#5

I really appreciate that. And your right about the 2D representation, and with hatching. I knew about attr on dyn. components, but on groups, I didn’t…


#6

Anyone else did investigate the file above for suggestions?

I am stil thinking about a piece of ruby code that reads the selected component, copy it, make it unique and past it in place.
But i can’t find the right way, the right code command in the api, to copy a selected component in ruby.


#7

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.