Show/Hide blocks by name

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

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Post one question per topic.
Post Reply
User avatar
Senior Member
Posts: 119
Joined: Thu Mar 10, 2016 1:08 pm
Location: Calafell, Tarragona, Spain

Show/Hide blocks by name

Post by dfriasb » Mon Jan 01, 2018 12:36 pm

Hello all and happy New Year!

I'm trying to write a script to show/hide specific blocks depending on their name. For example, I would like to control visibility of all the blocks that contain "_old" string in their name.

In order to "filter" these names I'm trying this piece of script:

Code: Select all

// ...
var BlockNamePart1 >= "A";
// I'm not really sure this variable definition is working in js...
if (block.getName() >= BlockNamePart1 + "_old") {
// I'm not sure this is possible neither...
Any help about this?

Best regards!
David Frías Barranco | architect
[email protected] |

Post Reply

Return to “QCAD 'How Do I' Questions”