Duplicate layer with subs

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 3365
Joined: Wed Sep 27, 2017 4:17 pm

Duplicate layer with subs

Post by CVH » Wed Mar 25, 2020 8:27 am

Referring to Husky's bug report:
https://www.qcad.org/bugtracker/index.p ... sk_id=2056

In my case it is common to duplicate complete sets of layer structures.
My 'clients' are picky and I re-create proposals as separate sets.

My workaround:

Used Y+/- to include or exclude entire layers to a selection.
-! Former art was that this included sublayers.
-! Newer art is the layer selection in the layer Widget itself.
The idea is that you end up with all the desired layers their entities selected.

Copy with reference. Ref e.g. 0,0
Start new drawing.
Paste ( NOT to current layer; Other options 0,1, no to all ).
Edit the top parent layer name.
Select All ( If lost focus ).
Copy with reference. Ref e.g. 0,0
Switch back to the source drawing.
Paste ( NOT to current layer; Other options 0,1, no to all ).
Kill the new drawing.

Done.
This way you have more freedom as with YY+subs. :wink:
In my case I would leave out what wasn't accepted and redo it for a new proposal.

Regards,
CVH.

Stan808
Newbie Member
Posts: 6
Joined: Wed Jun 07, 2023 9:40 pm

SOLVED Re: Duplicate layer with subs

Post by Stan808 » Sun Jul 02, 2023 7:31 am

Window 11
3.28.1.0 (3.28.1)

I'm having trouble trying to execute the instructions on how to do this.

Can a step by step instruction be provided?

Thanks for any help that can be rendered.

Aloha, Stan
Last edited by Stan808 on Tue Jul 04, 2023 7:43 pm, edited 1 time in total.

CVH
Premier Member
Posts: 3365
Joined: Wed Sep 27, 2017 4:17 pm

Re: Duplicate layer with subs

Post by CVH » Sun Jul 02, 2023 8:10 am

Stan,
IMHO it is nothing more than a step by step instruction set. :wink:

The idea is that you select all entities on the desired layers (Or at least one for the layer structure alone)
Then copy that selection to a new drawing, there the layers will be re-created on pasting the entities.
In the new file one can rename the top parent layer(s) or one can modify the whole structure and naming.
The inverse copy/paste will then create the renamed layer structure in your original file.

My top working layer is for example 'proposal 1' besides several common layers.
I have multiple sub-layers of 'proposal 1' that control certain aspects of the entities that live on it.
I have several dedicated layers like one for hatches and one for bitmaps.
Usually I store my hatch boundaries in a sub-layer of the hatches.
...

Copying all entities of 'proposal 1' to a new file, I can then rename the set to 'proposal 2' by editing the top layer name.
If I copy that back I have two main level working layers: 'proposal 1' and 'proposal 2' with the same layer structure, with the same content.
I can now freeze 'proposal 1' for the time being and alter the content under 'proposal 2'.
In this process I can still retrieve things from a former proposal, mixing things until the final proposal is accepted.

In a way I group things in layers instead of in blocks or rather a hybrid.
It's just easier and more clearly arranged this way.
Blocks do not have the same settings and degree of freedom as layers and sub-layers have.
I have to avoid using 'Edit Block In-place' (BB) at all costs.

Regards,
CVH

Stan808
Newbie Member
Posts: 6
Joined: Wed Jun 07, 2023 9:40 pm

Re: Duplicate layer with subs

Post by Stan808 » Sun Jul 02, 2023 7:36 pm

Sorry, still can't duplicate the sublayers.
Here's what I'm doing:
1. Created a new drawing entitled "Parent+Sub TEMPLATE"
2. Named parent layer: "PARENT LAYER." Placed a title block on this layer. Did this just to have something in the drawing.
3. Added 7 sublayers (ex. 01 xxx, 02 xxx, 03 xxx, etc). All sublayer are empty of entities.
4. Made sure parent and sublayers are unlocked and visible.
5. Made parent layer active. Used "CTL+A" to select title block on this layer.
6. Used "RC" (copy with reference). Selected bottom left corner.
7. Opened a new drawing.
8. Added new layer named "Layer 1."
9. Used "PS" (paste) and placed title block into new drawing.
Result: Title block is visible on Layer 1, however, no sublayers are shown in the layer list.
What am I doing wrong?
Thanks for your help.
Aloha, Stan

CVH
Premier Member
Posts: 3365
Joined: Wed Sep 27, 2017 4:17 pm

Re: Duplicate layer with subs

Post by CVH » Sun Jul 02, 2023 10:26 pm

Please refer to: https://www.qcad.org/rsforum/viewtopic. ... 153#p41476

The same is true for copy/paste,
We copy the entities that each live on a layer, with pasting in another document the non-existent layers are created on the fly.
The solution is then that there is something on each layer you want to 'duplicate'. :wink:

Regards,
CVH

Stan808
Newbie Member
Posts: 6
Joined: Wed Jun 07, 2023 9:40 pm

Re: Duplicate layer with subs

Post by Stan808 » Tue Jul 04, 2023 12:42 am

No joy.

Placed text on all layers.

I am able to copy all entities to a new file, all on one layer. No sublayers.

Anyway, thanks for all the help. I'll just tinker with it see what happens,

Stan

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Duplicate layer with subs

Post by Husky » Tue Jul 04, 2023 1:55 am

@Stan
Stan808 wrote:
Tue Jul 04, 2023 12:42 am
No joy.
I totally feel you! :|
Stan808 wrote:
Tue Jul 04, 2023 12:42 am
Anyway, thanks for all the help. I'll just tinker with it see what happens,
Basically it should be very simple. Please give it a last try, ok?

Use my test drawing to import such sub layers. Just open a new drawing, then import this drawing, option "Overwrite Layer", reference 0,0. It works on my side perfectly - tell me what your experience is.
sublayer import test.dxf
(99.99 KiB) Downloaded 183 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

CVH
Premier Member
Posts: 3365
Joined: Wed Sep 27, 2017 4:17 pm

Re: Duplicate layer with subs

Post by CVH » Tue Jul 04, 2023 5:00 am

Stan808 wrote:
Tue Jul 04, 2023 12:42 am
I am able to copy all entities to a new file, all on one layer. No sublayers.
Then I suspect that the Paste option 'To current layer' is active ...

It should look like this:
PasteOptions.png
PasteOptions.png (4.23 KiB) Viewed 3813 times

When I open Husky"s drawing I discover 4 points.
One on the main parent layer "1. Object" and one on each sub layer.
Copying these 4 points with reference (0,0) and paste that to a new file I have the same structure and content in the new file.
In the new file I rename "1. Object" to "2. Object".
Copying the 4 points back to the Husky's drawing I have 2 main level objects layers with the same sub-layer structure.
Nothing more to it.

Regards,
CVH

Stan808
Newbie Member
Posts: 6
Joined: Wed Jun 07, 2023 9:40 pm

Re: Duplicate layer with subs

Post by Stan808 » Tue Jul 04, 2023 7:36 pm

Success!!!

Needed to uncheck "To current layer."

This program is so rich in options that at times I forget to check the screen for what is available.

Mahalo to the two super contributors to this forum. I sorry to have taken up so much of your time. You've made my day.

Aloha, Stan

ps Will now work on putting "Solved" into initial question.

Post Reply

Return to “QCAD 'How Do I' Questions”