Importing blocks with attributes

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Importing blocks with attributes

Post by RobB » Tue Jun 18, 2019 9:03 pm

Designed a block with attributes and placed in the library. I can load it in a drawing through the library browser.
However, If I select and move the block, all 'static' parts of the block move correctly, but the attributes stay in place.
What went wrong in the block design?

Rob

(Running QCAD snapshot 3.22.1.2)
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

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

Re: Importing blocks with attributes

Post by Husky » Tue Jun 18, 2019 10:03 pm

Could you please attache an example dxf which shows the issue. Thanks.
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..."

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: Importing blocks with attributes

Post by RobB » Wed Jun 19, 2019 8:27 am

See attached.
When I select the block, the attributes are also separately selected, I have not been able to 'group' them as one unit. (could not find a group command).

Hence if I grab the box handle, only the box moves. If I use a move command, the whole group moves , as would happen with any multiple selection in a drawing.

I would have expected that the block, including its attributes could be grouped as a unit, and hence moved with its handle.

Rob
Attachments
forum-1.dxf
(113.41 KiB) Downloaded 526 times

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

Re: Importing blocks with attributes

Post by andrew » Wed Jun 19, 2019 8:55 am

Block references and block attributes are entities that live on the same level and largely independent from each other. This is by design (of the DXF/DWG format).

In QCAD, if you select a block reference which has attributes, the attributes get selected as well. This makes it easy to move or otherwise transform a block reference together with its attributes.
Hence if I grab the box handle, only the box moves.
Can you elaborate that you mean by "box handle"?

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

Re: Importing blocks with attributes

Post by Husky » Wed Jun 19, 2019 9:07 am

@Andrew

If you select the inserted block correctly (with luck!) everything will move.
If you select the block with targeting one of the attributes the block will split. You can move the block entities itself but the attributes will stay separated in place.
Edit: you can also move single attributes of this inserted block in model_space ... :(

Other funny thing: If I edit the attributes within the Property Manager the order of the Attributes will change regarding to my order of editing. e.g.if I edit the 5. attribute it will jump to the first place in that order ....
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..."

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: Importing blocks with attributes

Post by RobB » Wed Jun 19, 2019 9:46 am

Box handle:

If I select the block by e.g, clicking on its left hand bottom corner, the small blue box that appears. It selects the whole block including lines and texts, and that moves as a unit. That single click also selects the attributes that are part of the block, but they don't move along.

I actually found out that you often get one 'free' correct move. If I insert the block in a new document, and re-select it by a single click, I can move ONCE the complete block (most of the times). Selecting again it dumps the attribute links.

Rob
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

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

Re: Importing blocks with attributes

Post by andrew » Wed Jun 19, 2019 10:35 am

Husky wrote:
Wed Jun 19, 2019 9:07 am
If you select the block with targeting one of the attributes the block will split. You can move the block entities itself but the attributes will stay separated in place.
I couldn't reproduce this here. If I select an attribute, only the attribute is selected (correct).
Husky wrote:
Wed Jun 19, 2019 9:07 am
Edit: you can also move single attributes of this inserted block in model_space ... :(
Correct. Attributes can be moved around, edited, deleted and their properties can be changed (color, etc). This is all intended and a feature, not a bug ;) You can synchronize attributes with their definition in the block using Block > Attributes > Synchronize Attributes.

You have to think of attributes more as a suggestion of text entities to be inserted along with the block, not as something that is part of the block.
Husky wrote:
Wed Jun 19, 2019 9:07 am
Other funny thing: If I edit the attributes within the Property Manager the order of the Attributes will change regarding to my order of editing. e.g.if I edit the 5. attribute it will jump to the first place in that order ....
I couldn't reproduce this behaviour. Attributes should be listed in alphabetical order in the property editor.

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

Re: Importing blocks with attributes

Post by andrew » Wed Jun 19, 2019 10:38 am

RobB wrote:
Wed Jun 19, 2019 9:46 am
If I select the block by e.g, clicking on its left hand bottom corner, the small blue box that appears. It selects the whole block including lines and texts, and that moves as a unit. That single click also selects the attributes that are part of the block, but they don't move along.
Try dragging the block by dragging a line (somewhere along the line, NOT close to one of the red or blue reference points). There's indeed a difference in dragging the object or only a single reference point of an object.

RobB
Full Member
Posts: 72
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: Importing blocks with attributes

Post by RobB » Wed Jun 19, 2019 11:28 am

[/quote]
Try dragging the block by dragging a line (somewhere along the line, NOT close to one of the red or blue reference points). There's indeed a difference in dragging the object or only a single reference point of an object.
[/quote]

Confirm that. A bit confusing but workable. Found another issue:

When editing the attributes of a block, going from the first edited attribute in the Property Manager to the second one, and hitting 'Backspace' to delete the old attribute value one backspace to many, this will delete the whole block in the drawing.

Rob
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

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

Re: Importing blocks with attributes

Post by Husky » Wed Jun 19, 2019 8:04 pm

andrew wrote:
Wed Jun 19, 2019 10:35 am
Husky wrote:
Wed Jun 19, 2019 9:07 am
Edit: you can also move single attributes of this inserted block in model_space ... :(
Correct. Attributes can be moved around, edited, deleted and their properties can be changed (color, etc). This is all intended and a feature, not a bug ;)
Ok, I haven't notice that before. But honestly - I would expect that behavior after exploding the block ones but not as a feature of a regular block. The idea of a block is in my opinion that I have everything bonded in an arrangement until I decide to dismantle the structure.
andrew wrote:
Wed Jun 19, 2019 10:35 am
Husky wrote:
Wed Jun 19, 2019 9:07 am
Other funny thing: If I edit the attributes within the Property Manager the order of the Attributes will change regarding to my order of editing. e.g.if I edit the 5. attribute it will jump to the first place in that order ....
I couldn't reproduce this behaviour. Attributes should be listed in alphabetical order in the property editor.
Please try this one. Select the Title Block in Model_Space, use the Property Editor to change "5. Designed" and see what happens with the order in PE. Try it again with an other attribute ...

Attribute changing order in PE.dxf
(173.93 KiB) Downloaded 531 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..."

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

Re: Importing blocks with attributes

Post by andrew » Wed Jun 19, 2019 8:45 pm

Husky wrote:
Wed Jun 19, 2019 8:04 pm
Ok, I haven't notice that before. But honestly - I would expect that behavior after exploding the block ones but not as a feature of a regular block. The idea of a block is in my opinion that I have everything bonded in an arrangement until I decide to dismantle the structure.
Yes - the important part to realize is that attributes are not part of the block.
Husky wrote:
Wed Jun 19, 2019 8:04 pm
Please try this one. Select the Title Block in Model_Space, use the Property Editor to change "5. Designed" and see what happens with the order in PE. Try it again with an other attribute ...
Thanks for the file. Confirmed bug:
https://qcad.org/bugtracker/index.php?d ... sk_id=1905

Post Reply

Return to “QCAD Troubleshooting and Problems”