Page 1 of 1

Importing blocks with attributes

Posted: Tue Jun 18, 2019 9:03 pm
by RobB
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)

Re: Importing blocks with attributes

Posted: Tue Jun 18, 2019 10:03 pm
by Husky
Could you please attache an example dxf which shows the issue. Thanks.

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 8:27 am
by RobB
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

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 8:55 am
by andrew
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"?

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 9:07 am
by Husky
@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 ....

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 9:46 am
by RobB
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

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 10:35 am
by andrew
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.

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 10:38 am
by andrew
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.

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 11:28 am
by RobB
[/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

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 8:04 pm
by Husky
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 90 times

Re: Importing blocks with attributes

Posted: Wed Jun 19, 2019 8:45 pm
by andrew
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