[Solved] Batch modify properties of all components of many blocks together

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
DanRom624
Newbie Member
Posts: 8
Joined: Mon Oct 31, 2022 7:35 pm

[Solved] Batch modify properties of all components of many blocks together

Post by DanRom624 » Mon Oct 31, 2022 8:10 pm

After some studying and exercising, the interaction among layers, blocks, their constituent entities, and their properties is - eventually! - clear to me.
I still have a problem with them, though.
I have quite a number of blocks (>500) that I imported from an existing library. All their constituent components are on layer 0 and have "by layer" properties, which is a nuisance - as you can probably imagine.
Is there a method for selecting all the blocks at once, and batch modifying some properties (such as layer, color, or line type) of ALL their constituent entities in one go to "by block", for instance, instead of going block-by-block, select all entities, change the desired property to the desired value?
Thank you indeed!
PS: I've already studied the following tutorial, so, please do not suggest it as a solution, thanks :-)
https://qcad.org/en/tutorial-layers-blo ... attributes

PS:
QCAD Version - 3.27.8.0 (3.27.8)
Operating system - MacOS 12.6 (Monterey)
Last edited by DanRom624 on Mon Nov 07, 2022 3:21 pm, edited 1 time in total.

DanRom624
Newbie Member
Posts: 8
Joined: Mon Oct 31, 2022 7:35 pm

Re: Batch modify properties of all components of many blocks together

Post by DanRom624 » Mon Oct 31, 2022 8:16 pm

Additional information...

I was wondering ... there might be a method for importing the blocks in a way that their constituent elements go all on the layer where the block is imported to. Or something similar.
That would solve the problem, as well, I think.
Of course I have no clue how to do that! :-)

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

Re: Batch modify properties of all components of many blocks together

Post by Husky » Mon Oct 31, 2022 10:02 pm

Hi,
DanRom624 wrote:
Mon Oct 31, 2022 8:10 pm
I have quite a number of blocks (>500) that I imported from an existing library. All their constituent components are on layer 0 and have "by layer" properties, which is a nuisance - as you can probably imagine.
May I ask you what for you need > 500 Blocks in a drawing? Common praxis would be to use them as needed out of a library.
BTW: I would prefer to have those blocks on layer 0 - what is wrong with that?
DanRom624 wrote:
Mon Oct 31, 2022 8:10 pm
Is there a method for selecting all the blocks at once, and batch modifying some properties (such as layer, color, or line type) of ALL their constituent entities in one go to "by block", for instance, instead of going block-by-block, select all entities, change the desired property to the desired value?
No, not to my knowledge - that isn't possible with QCAD on-board tools. If the file format is dxf then you could use a third party editor but that would be still a very labor-intensive task. Is it that worth?
DanRom624 wrote:
Mon Oct 31, 2022 8:16 pm
I was wondering ... there might be a method for importing the blocks in a way that their constituent elements go all on the layer where the block is imported to. Or something similar.
For importing block? That would astonish me! I don't know about this possibility but go ahead - teach an old dog a new trick ... :wink:
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..."

DanRom624
Newbie Member
Posts: 8
Joined: Mon Oct 31, 2022 7:35 pm

Re: Batch modify properties of all components of many blocks together

Post by DanRom624 » Mon Oct 31, 2022 10:33 pm

Thank you, Husky.
As you understood, I'm still in the learning phase...
Perhaps some of my practices are not "best practices", yet... but I'll do all that I can to refine them soon
I found your reply very useful not only because it gave me an answer to my question ("it cannot be done"), but also because it implicitly stressed quite some weaknesses of my approach :-)

BTW: if you are WorldHusky on Youtube, I want to take the opportunity for thanking you for your numerous tutorials on QCAD. Very helpful, indeed!

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

Re: Batch modify properties of all components of many blocks together

Post by Husky » Mon Oct 31, 2022 11:25 pm

DanRom624 wrote:
Mon Oct 31, 2022 10:33 pm
As you understood, I'm still in the learning phase...
Don't worry to much about that. Keep in mind that every one of us startet at exact the same level. The bit more experienced user in this forum are glad to help you to get better and better in your CAD journey with QCAD ...
DanRom624 wrote:
Mon Oct 31, 2022 10:33 pm
BTW: if you are WorldHusky on Youtube, I want to take the opportunity for thanking you for your numerous tutorials on QCAD. Very helpful, indeed!
You're welcome. Most of the video are done as support to a forum question .... :wink:
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: 3419
Joined: Wed Sep 27, 2017 4:17 pm

Re: Batch modify properties of all components of many blocks together

Post by CVH » Tue Nov 01, 2022 7:58 am

Hi,

Layers are meant to group things that should look alike ... Color, Linetype & weight.
Blocks group things that are part of the same geometry.

Meaning that entities in Blocks can be of the nature 'hidden', 'thin' or displayed in red and so one.
All entities on the 'thin' layer are supposed to look thin.
Not common practice but if required one can still set individual general properties.

There is a preference for 'better' compatibility:
See App.Prefs. .. Layer .. Compatibility
Probably the main reason why your block entities are all on Layer 0.

I see no reason why all Block entities should be move to let's say the Layer with construction lines ... :wink:

In essence there is no need for a batch that does so, but with scripting almost anything can be achieved.

Still some advice:
- Under QCAD avoid so called 'massive blocks' like a first floor, second and third with a huge amount of drawing items.
- Avoid the use of stacking many Blocks meaning constructing Block in Block in Block in ... :wink:

Finally, there is no reason for inserting +500 Blocks if they are not used at all.

Regards,
CVH

DanRom624
Newbie Member
Posts: 8
Joined: Mon Oct 31, 2022 7:35 pm

Re: Batch modify properties of all components of many blocks together

Post by DanRom624 » Tue Nov 01, 2022 1:31 pm

Thank you CVH for your explanation; very clear!

So far, I have imagined a totally different approach to layers, though.
Perhaps I'm completely on the wrong path!

For instance, in designing the floor plan of a one-story house, I'd create the following layers:
- Layer 0 (it's there by default)
- Floor plan (just the walls)
- Rooms' labels
- Doors and windows
- HVAC
- Plumbing
- Electrical system
- Furniture
- Appliances
- Backyard
- etc. etc.
all on different layers.
Symbols and icons to be used are on Layer 0, with "by block" attributes.
When I need a block, I copy an instance of it on its relevant layer (say: when I need to draw a chair, I pick its icon from the library, and put an instance of it on the "Furniture" layer).
This way, I can switch on and off the systems/parts I want to work on or visualize.
(I don't want to see the furniture on the plan that I print for the electrician to implement the electrical system; but, indeed, I'd need to visualize temporarily the furniture when designing the system [when deciding where to place switches, outlets, lamps, etc.])

So, in my approach, layers are linked to functions, rather than to entities' appearance.
As an example:
if we take the electrical system, it is made of several blocks (standard symbols for switches, outlets, lamps, etc; plus an indication of what-is-connected-to-what...) which may have different visual properties.
In this case, the wiring (i.e.: what-is-connected-to-what) is a dashed spline of the same color, but thinner, than the continuous lines that constitute the electric symbols.
That's the idea.

I don't have an image, yet, because I am still studying the tool (QCAD), and have not started the project, and I'm reluctant to post here an image on which I do not have the copyright. Sorry for that.

Concerning the 500 blocks, that was supposed to be the library of symbols and icons that I might have used. But, meanwhile, I have abandoned that approach.

Thank you again

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

Re: Batch modify properties of all components of many blocks together

Post by CVH » Sun Nov 06, 2022 8:50 am

DanRom624 wrote:
Tue Nov 01, 2022 1:31 pm
So far, I have imagined a totally different approach to layers, though.
Perhaps I'm completely on the wrong path!
Yes and no, if it works for you, then why not? :wink:

I must admit that Layers are better equipped with attributes.
Meaning: Visible, Frozen, Locked, Snappable and Plottable.
Beside the general properties Color, Lineweight and LineType.
Things one can store in Layer States but there is nothing similar like Block States.

Although it seems that one can set Color and Lineweight (not LineType) for a Block, but such is not retained. :?
Although one can set the hidden property of a Block in the Property Editor what is functional, the state is not reflected in the Block List.
But it can be set/cleared from within the Block List. :roll:

And then there is the contradiction not to use 'Massive Blocks'.
How to reuse the general geometry of a floor plan for an N-stores building?
N individual full copies could become troublesome if there is a single misplacement or a later change in the layout ... :wink:
A dedicated Layer seems perfect but not everything on that Layer may require the same attributes ... :(

Adding up:
I use Blocks for tiny things that reoccur, Layers to control attributes but I am still looking for something to group complete geometries or designs.

What I do is rather a hybrid.
I have parent layers in the way you describe it, as overall designation but then mostly empty and child's to control entities attributes.
In that way I can Lock/hide the hatching of the outer walls but still have hatched areas in let's say Furniture/Appliances/Backyard if those are visible. Similar for construction lines, center lines, dotted or whatever.

Regards,
CVH

DanRom624
Newbie Member
Posts: 8
Joined: Mon Oct 31, 2022 7:35 pm

Re: [Solved] Batch modify properties of all components of many blocks together

Post by DanRom624 » Mon Nov 07, 2022 3:24 pm

Thank you all for contributing to clarifying the issue.
I have marked the thread as [solved], even though there's not a real solution to my problem, but rather a different organization of my drawing and better use of the layers' features.

Post Reply

Return to “QCAD 'How Do I' Questions”