How To: non-visible blocks

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

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

How To: non-visible blocks

Post by CVH » Wed Nov 25, 2020 9:26 am

I was lurking in the CAM section.
viewtopic.php?f=74&t=7809
Loaded both Router-Vac-Mount.02.dxf in QCAD
Installed QCADCAM trial
Loaded them again

I can't figure out the Blocks setup in those files.
I can edit unlisted blocks.
I see entities one above the other. (mixed color red-white with one selected)
I can select them with the Alt key (some not) and most things I get make sence.
I can read the dxf directly and see that some unlisted blocks have attributes that have a meaning in CAM.

Question:
How to create such unlisted blocks to store relevant data used in Tile2Hatch.

Currently I use layer or Entity custom attributes.
The issue is that I can't protect such information.
The user can alter these entities or custom attributes and then they are no longer in sync.

Regards,
CVH

User avatar
andrew
Site Admin
Posts: 7321
Joined: Fri Mar 30, 2007 6:07 am

Re: How To: non-visible blocks

Post by andrew » Mon Nov 30, 2020 8:13 am

These blocks are hidden from the user if
Edit > Application Preferences > Widgets > Block List > Hide internal blocks
is checked.

The relevant custom property is:

ResourceFlag

If this property is set (to any value), the block is considered a QCAD internal resource block. These are used to represent tools and toolpaths in QCAD/CAM and can be used to represent any other custom objects in other QCAD extensions.

See also:
https://github.com/qcad/qcad/blob/maste ... st.js#L156

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

Re: How To: non-visible blocks

Post by CVH » Mon Nov 30, 2020 8:51 am

Thanks,

I see, and anonymous blocks (A$C+10chars) too.
You mention 'to any value' ... Is there a guide, a ruling, a list?

Good to know.
Although that isn't the end of the story ...
This means I have to merge my system entities in a block ... :oops: by script.
Up to now I have not much experience with those.

Kinda avoided them being rather buggy at some few points.
(That is my point of view reading all topics and bug reports :wink: )

Regards,
CVH

Post Reply

Return to “QCAD Developers and Contributors”