SOLVED - HOW to Create a block WITH attribute
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Active Member
- Posts: 36
- Joined: Mon Nov 23, 2020 4:37 pm
SOLVED - HOW to Create a block WITH attribute
I've imported from a Acad drawing a Block with text attribute (see attached example)
I can use it in Qcad, BUT in the manual I do NOT find how to create a new one from scratch.
IS it possible to create it from scratch in QCAD?
HOW do I proceed ?
Giuliano
PS using 3.27.9.0 (3.27.9) under Ubuntu 22.04
I can use it in Qcad, BUT in the manual I do NOT find how to create a new one from scratch.
IS it possible to create it from scratch in QCAD?
HOW do I proceed ?
Giuliano
PS using 3.27.9.0 (3.27.9) under Ubuntu 22.04
- Attachments
-
- block with attribute.dxf
- (100.35 KiB) Downloaded 192 times
Last edited by Giuliano69 on Wed May 17, 2023 9:53 pm, edited 1 time in total.
Re: HOW to Create a block WITH attribute
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
-
- Active Member
- Posts: 36
- Joined: Mon Nov 23, 2020 4:37 pm
Re: HOW to Create a block WITH attribute
Dear Husky,
thanks for you quick help.
I sTILL find a misbehavior ..
1- I can create the attribute (see attached example), creating the label and the predefined "value", BUT as you can see the text shown is still the "label" not the "value". And whatever text I insert in the field, it still keeps showing the "label" and not the "value".
2- One more "slight" difference is that the first imported example block (from Acad) does NOT have the "prompt" field; the Qcad created one does shows the field...
Any Idea about the strange behavior and the showed difference ?
BR
Giuliano
thanks for you quick help.
I sTILL find a misbehavior ..
1- I can create the attribute (see attached example), creating the label and the predefined "value", BUT as you can see the text shown is still the "label" not the "value". And whatever text I insert in the field, it still keeps showing the "label" and not the "value".
2- One more "slight" difference is that the first imported example block (from Acad) does NOT have the "prompt" field; the Qcad created one does shows the field...
Any Idea about the strange behavior and the showed difference ?
BR
Giuliano
- Attachments
-
- block with attribute 2.dxf
- (99.34 KiB) Downloaded 176 times
Re: HOW to Create a block WITH attribute
1. I can't find any Attribute in the block definition ...
(Please recall the Attribute description, "Use this tool to add an attribute definition to a block definition.")
2. The found Attribute in Model_Space is without a "Prompt" info. Please make sure all question in the Attribute dialog are answered even if other CAD programs handle it differently.
3. Check out this modified drawing - would that suit what you are looking for?
(Please recall the Attribute description, "Use this tool to add an attribute definition to a block definition.")
2. The found Attribute in Model_Space is without a "Prompt" info. Please make sure all question in the Attribute dialog are answered even if other CAD programs handle it differently.
3. Check out this modified drawing - would that suit what you are looking for?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: HOW to Create a block WITH attribute
Giuliano,
There is a difference between Attributes, Block Attributes and Attribute Definitions.
Attributes in Model Space are not associated with a Block Reference like Block Attributes.
I know of no way to create dissociated Attributes in QCAD but by scripting and a fixed bug while duplicating (DP) them.
An Attribute Definition is part of a Block definition, a Block Attribute template if you like.
When a Block Reference is inserted, a Block Attribute is created based on the Attribute Definition.
There is no visual difference between Attributes and Block Attributes.
The difference is that Block Attributes store the associated Block Reference id and are selected together with that Block Reference.
QCAD does not list the associated Block Reference as a property in the Property Editor.
On selecting a Block Attribute it depends on your Application Preferences if the associated Block Reference is selected together or not.
If not one can also select only the Block Reference with a second click on it.
On Block Insert QCAD list up the prompts (not the tags) in the Attributes drop-down box and the default values beside that.
That will be an empty field when there is no prompt defined.
One can easily edit the prompt in block edit mode with a double click on the Attribute Definition.
The prompt has no further meaning once a Block Attribute is created.
Maybe it is an idea to revert to the tag when the prompt is empty.
One could consider to enter a feature request here: https://www.ribbonsoft.com/bugtracker/
Regards,
CVH
There is a difference between Attributes, Block Attributes and Attribute Definitions.
Attributes in Model Space are not associated with a Block Reference like Block Attributes.
I know of no way to create dissociated Attributes in QCAD but by scripting and a fixed bug while duplicating (DP) them.
An Attribute Definition is part of a Block definition, a Block Attribute template if you like.
When a Block Reference is inserted, a Block Attribute is created based on the Attribute Definition.
There is no visual difference between Attributes and Block Attributes.
The difference is that Block Attributes store the associated Block Reference id and are selected together with that Block Reference.
QCAD does not list the associated Block Reference as a property in the Property Editor.
On selecting a Block Attribute it depends on your Application Preferences if the associated Block Reference is selected together or not.
If not one can also select only the Block Reference with a second click on it.
On Block Insert QCAD list up the prompts (not the tags) in the Attributes drop-down box and the default values beside that.
That will be an empty field when there is no prompt defined.
One can easily edit the prompt in block edit mode with a double click on the Attribute Definition.
The prompt has no further meaning once a Block Attribute is created.
Maybe it is an idea to revert to the tag when the prompt is empty.
One could consider to enter a feature request here: https://www.ribbonsoft.com/bugtracker/
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Mon Nov 23, 2020 4:37 pm
Re: HOW to Create a block WITH attribute
Hi guys,
thanks for your replies !
Unfortunately ( I cannot get the same result as Husky ?
Where I'm doing wrong ?
Here is the screen cast... the produced block with attribute does not behave like Husky's one...
https://drive.google.com/file/d/14g64Bp ... share_link
Giuliano
thanks for your replies !
Unfortunately ( I cannot get the same result as Husky ?
Where I'm doing wrong ?
Here is the screen cast... the produced block with attribute does not behave like Husky's one...
https://drive.google.com/file/d/14g64Bp ... share_link
Giuliano
Re: HOW to Create a block WITH attribute
Giuliano,
Please unhide the Block List ...
View .. Block List (GB) or just type the shortcut key sequence 'GB'.
After you have created a block from the selection that block will be listed in the Block List.
Now first edit the newly added block before you add an Attribute Definition.
Select it in the Block List (single left click) and edit it (BE) or double click it.
After that you need to return to the main drawing (EM) or double click on the Model_Space block.
Then the block with attributes should pop up when you insert the block (BI) in Model_Space.
Regards,
CVH
Please unhide the Block List ...
View .. Block List (GB) or just type the shortcut key sequence 'GB'.
After you have created a block from the selection that block will be listed in the Block List.
Now first edit the newly added block before you add an Attribute Definition.
Select it in the Block List (single left click) and edit it (BE) or double click it.
After that you need to return to the main drawing (EM) or double click on the Model_Space block.
Then the block with attributes should pop up when you insert the block (BI) in Model_Space.
Regards,
CVH
Re: HOW to Create a block WITH attribute
Creating a block with Attributes:
Using a block with Attributes in a drawing:
Using a block with Attributes in a drawing:
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
-
- Active Member
- Posts: 36
- Joined: Mon Nov 23, 2020 4:37 pm
Re: HOW to Create a block WITH attribute
Hi Huscky
thanks for your help.
You solved my problem.
Maybe your solution could be added to the manual to better understand the attribute block.
One more question.
AFTER the creation of the block, and dragging the item from the window, the attribute get created.
BUT just after the definition, the attribute is NOT visible (even in your gif)
Why such behavior ?
Giuliano
thanks for your help.
You solved my problem.
Maybe your solution could be added to the manual to better understand the attribute block.
One more question.
AFTER the creation of the block, and dragging the item from the window, the attribute get created.
BUT just after the definition, the attribute is NOT visible (even in your gif)
Why such behavior ?
Giuliano
Re: HOW to Create a block WITH attribute
@Giuliano
I’m happy to be of assistance.
Good question! Honestly - I don't know. Maybe Andrew can enlighten both of us ...?Giuliano69 wrote: ↑Wed May 17, 2023 9:53 pmBUT just after the definition, the attribute is NOT visible (even in your gif)
Why such behavior ?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: SOLVED - HOW to Create a block WITH attribute
Because it is common to add Attribute Definitions as entities while editing the related Block.Giuliano69 wrote: ↑Wed May 17, 2023 9:53 pmBUT just after the definition, the attribute is NOT visible (even in your gif)
So that Block Attributes are created on inserting the block.
With 'Create Block from Selection (BC)':
All selected entities are moved to a block of choice but only a Block Reference of that block is generated in Model Space to replace them.
https://github.com/qcad/qcad/blob/maste ... ck.js#L172
If the moved entities where Attribute Definitions they are not replaced by Block Attributes in Model Space.
The work around is then: BC .. Delete the remaining selection .. Select the new block in the Block List .. Insert Block (BI)
The relative zero would still be the original insertion point.
Regards,
CVH
Re: SOLVED - HOW to Create a block WITH attribute
EDIT: Hide the block in the Block List before inserting it.
One gets a transaction failure for the Block Reference but the Attributes are created as orphans.
Regards,
CVH
Re: SOLVED - HOW to Create a block WITH attribute
I have a question about blocks with attributes...hoping someone might know whats happening?
I am using a few blocks which were created before I started using QCad.
Now I have two separate blocks listed in my block list, one is an insertable block with editable attribute
and the other is just the parts in the first block. but I need both of them in the drawing to work.
what am I missing here?
I am using a few blocks which were created before I started using QCad.
Now I have two separate blocks listed in my block list, one is an insertable block with editable attribute
and the other is just the parts in the first block. but I need both of them in the drawing to work.
what am I missing here?
Re: SOLVED - HOW to Create a block WITH attribute
Sounds like block 1 is created partly and for no reasons with block 2.
Would it improve your workflow when you edit block 1, explode the block 2 reference and then delete block 2?
Would it improve your workflow when you edit block 1, explode the block 2 reference and then delete block 2?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."