Layout blocks - order

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
User avatar
bambuko
Premier Member
Posts: 192
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Layout blocks - order

Post by bambuko » Tue Apr 15, 2025 9:54 am

Is there a way of deleting/editing of system created numbering order of layout blocks?
Adding/inserting additional layout blocks in an order that makes sense to the user throws out system numbering out of order...
Like so:
Screenshot_20250415_094402.png
Screenshot_20250415_094402.png (35.37 KiB) Viewed 15289 times
I would like it to look like so (regardless of internal/system ordering):
change.png
change.png (56.83 KiB) Viewed 15289 times

Code: Select all

QCAD Professional
Version: 3.32.2.0 (3.32.2)
Internet: QCAD.org
Build Date: Feb 20 2025
Revision: 6616def
Qt Version: 5.14.2
Architecture: x86_64
Compiler: gcc 5.4.0
QCad Pro
Linux MX-23.5_KDE_x64 Libretto

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

Re: Layout blocks - order

Post by CVH » Wed Apr 16, 2025 4:17 am

Hi,

Adding a Layout Block is a QCAD Pro feature and these are not readily documented.
But it won't be rocket science ... :wink:

The single mandatory Layout in a new file is called Layout1(*Paper Space) with order 0.
On creation of a new Layout an order is assigned that is 1 higher as what already exist in the drawing at that time.
The addition (*Paper Space) is also increased 1 up starting from -1 (="") to (*Paper Space0) and cannot be edited.

In the example below I added 'Layout2' and 'Layout3' chronologically but changed their list order to 0 afterwards.
:arrow: Clearly NOT sorted on Layout name nor on Paper Space number.
I can not easily retrieve the object handles but assume that they are also chronological upon creation.

LayoutOrderZero.png
All Tab order = Zero
LayoutOrderZero.png (9.64 KiB) Viewed 14746 times

Certain Blocks are not listed and filtered out in BlockList.js.
Finally traced back to a sorting function called in line 247 (Current state):
- model space always first
- layouts always before other blocks
- sort among layouts by tab order
- sort by layout name or block name (ignoring * at start)
:!: Notice that the last rule will never be reached when comparing 2 Layout objects with the same 'tab order'.
The third rule will return false anyway and things are left unsorted as they are queried from the document.


Meaning that we can force any listing order but only by editing the list order values.
Below I forced a reverse order with unique values 0-2.

LayoutOrderInverse.png
Inverse Tab orders
LayoutOrderInverse.png (11.78 KiB) Viewed 14746 times

HowTo:
- Select the Layout in the Block List.
- Rename Block (BN) or hit the [a|b] button.
- Adapt the list order and make it chronological as for your needs.

It may be an idea to file a feature request to sort Layouts with the same 'tab order' alphanumerical like other Blocks ...
... As stated and intended in the code.

Regards,
CVH

User avatar
bambuko
Premier Member
Posts: 192
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: Layout blocks - order

Post by bambuko » Wed Apr 16, 2025 8:54 am

Thank you,
CVH wrote:
Wed Apr 16, 2025 4:17 am
It may be an idea to file a feature request to sort Layouts with the same 'tab order' alphanumerical like other Blocks ...
... As stated and intended in the code...
so that sounds more like "bug report" (i.e. QCAD doesn't work like intended?) than "feature request" :P
where do I file feature request, please?
QCad Pro
Linux MX-23.5_KDE_x64 Libretto

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

Re: Layout blocks - order

Post by CVH » Wed Apr 16, 2025 12:27 pm

bambuko wrote:
Wed Apr 16, 2025 8:54 am
so that sounds more like "bug report"
When you look at the code then there is nothing wrong with the current behavior.
But the note: sort by layout name or block name (ignoring * at start) implies that Layouts may still be sorted like normal Blocks.

Perhaps the intention was there but this code is never reached for Layout Blocks.
Hence 'Feature Request'.

Feature requests are also filed on QCAD Bugtracker.

Regards,
CVH

User avatar
bambuko
Premier Member
Posts: 192
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: Layout blocks - order

Post by bambuko » Wed Apr 16, 2025 12:41 pm

Thank you
https://www.ribbonsoft.com/bugtracker/
waiting to be approved
QCad Pro
Linux MX-23.5_KDE_x64 Libretto

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

Re: Layout blocks - order

Post by CVH » Wed Apr 16, 2025 1:22 pm

bambuko wrote:
Wed Apr 16, 2025 12:41 pm
waiting to be approved
The last task that was added is FS#2661 and was fixed ... :roll:
No task related to 'Layout' or 'Layouts' and their list 'order' is still open or was closed before.

I don't understand the following: 'waiting to be approved'
Submitting a feature request or bug report as logged on user is instantaneously.
It is at Andrew's discretion what he does with it.

Regards,
CVH

User avatar
bambuko
Premier Member
Posts: 192
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: Layout blocks - order

Post by bambuko » Wed Apr 16, 2025 1:33 pm

QCad Pro
Linux MX-23.5_KDE_x64 Libretto

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

Re: Layout blocks - order

Post by CVH » Wed Apr 16, 2025 1:48 pm

Voted it up to 1 vote. :wink:

Regards,
CVH

User avatar
bambuko
Premier Member
Posts: 192
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: Layout blocks - order

Post by bambuko » Wed Apr 16, 2025 1:55 pm

CVH wrote:
Wed Apr 16, 2025 1:22 pm
...I don't understand the following: 'waiting to be approved...
my registration required to be approved before I could log in...
thank you for up-voting it
QCad Pro
Linux MX-23.5_KDE_x64 Libretto

Post Reply

Return to “QCAD 'How Do I' Questions”