Page 1 of 1

Copying layers

Posted: Mon Jun 16, 2014 10:52 am
by caigner
Hello!

I found it helpful to organize my work into layers for each object I draw. So I created a layer structure like this:
QCAD_layers.png
QCAD_layers.png (11.68 KiB) Viewed 4397 times
Now, when I start to work on object #2 I want to create the same hierarchy of layers for it.

The simple way would be to copy & paste the layer structure to get this:
QCAD_layers2.png
QCAD_layers2.png (18.3 KiB) Viewed 4397 times
Is there a way to copy selected layers?

Regards,
Christian

Re: Copying layers

Posted: Mon Jun 16, 2014 7:38 pm
by andrew
The only automated way of doing this I can think of is:
- copy whole drawing to a new, empty document
- in that document, rename 'object1' to 'object2'
- copy entire drawing back into original document
- delete pasted drawing

On a side note: layers are generally intended to structure entities with a similar function together (e.g. all center lines are on one layer).
Layers are not meant for grouping objects - that's what blocks are for.
In your example, I would recommend to have only one layer hierarchy for all objects (e.g. all layers below 'Object1').
Then group each object into a separate block named 'objectX'.

Re: Copying layers

Posted: Mon Jun 16, 2014 9:13 pm
by Husky
Hi Cristian,
caigner wrote:The simple way would be to copy & paste the layer structure
with the background information from Andrew in mind - how about to create a template layer list to fit your needs?
If you invest the time to pre-design a layer list with - let say - 20 Objects(?) you could use them directly out of the Library. If you then only need 12 Objects - so what - just delete the rest in the list. :wink:
Check this out and maybe you can customize it to your needs ...
viewtopic.php?f=47&t=1992

Or you could also prepare a Drawing Template with the predefined Layer List ......

Re: Copying layers

Posted: Tue Jun 17, 2014 10:27 am
by caigner
andrew wrote:The only automated way of doing this I can think of is:
- copy whole drawing to a new, empty document
- in that document, rename 'object1' to 'object2'
- copy entire drawing back into original document
- delete pasted drawing
I guess I can do that. I'll give it a try.
andrew wrote: On a side note: layers are generally intended to structure entities with a similar function together (e.g. all center lines are on one layer).
Layers are not meant for grouping objects - that's what blocks are for.
In your example, I would recommend to have only one layer hierarchy for all objects (e.g. all layers below 'Object1').
Then group each object into a separate block named 'objectX'.
Layers have an advantage over blocks: I can hide/unhide them easily. That makes it very comfortable to work with them.
Can I do that also with blocks?

O do a lot of assembly drawing, where I construct all the parts on one "paper". I put each part on its own layer so I can easily hide/unhide it.
That's why I came up with that layer-approach.

Re: Copying layers

Posted: Tue Jun 17, 2014 10:31 am
by caigner
Husky wrote:Hi Cristian,

with the background information from Andrew in mind - how about to create a template layer list to fit your needs?
If you invest the time to pre-design a layer list with - let say - 20 Objects(?) you could use them directly out of the Library. If you then only need 12 Objects - so what - just delete the rest in the list. :wink:
Check this out and maybe you can customize it to your needs ...
viewtopic.php?f=47&t=1992

Or you could also prepare a Drawing Template with the predefined Layer List ......
It's definitely a way to solve my "problem". :-)

I didn't know that there is such a thing as a template layer list. I only knew of drawing templates.

Thanks!

Re: Copying layers

Posted: Tue Jun 17, 2014 10:41 am
by andrew
caigner wrote:Layers have an advantage over blocks: I can hide/unhide them easily. That makes it very comfortable to work with them.
Can I do that also with blocks?
Yes, but only in QCAD and the on/off status will not be saved (an unfortunate restriction of the DXF/DWG format).
In the future it might actually also be possible to save the on/off status of blocks (through XData).

Re: Copying layers

Posted: Tue Jun 17, 2014 4:24 pm
by andrew
andrew wrote:In the future it might actually also be possible to save the on/off status of blocks (through XData).
I can confirm now that the block visibility status will be saved and restored in future releases.

Re: Copying layers

Posted: Tue Jun 17, 2014 6:42 pm
by Husky
andrew wrote:I can confirm now that the block visibility status will be saved and restored in future releases.
That are good news! :D