Block Attributes limited?

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
User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Block Attributes limited?

Post by Husky » Thu Sep 19, 2013 9:29 am

3.3.0 /XP32

Hi,
I'm right now playing around with the new QCAD Version / Block Attributes.
My Question is: If I have more than three Block Attributes in a Block and will insert this block in my drawing - I'm only able to define, during the insert process, three Attributes?
Or in my test two - because the third one is not working? :shock:
Husky-2013.09.19-01.png
Husky-2013.09.19-01.png (9.29 KiB) Viewed 6973 times

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

Re: Block Attributes limited?

Post by andrew » Thu Sep 19, 2013 9:44 am

I can confirm that the third input is not working. This has been fixed for the next release.

You can quick-fix it by appending these lines to the file scripts/Block/InsertBlock/InsertBlock.js at the bottom:
InsertBlock.prototype.slotAttribute3Changed = function(value) {
    if (isNull(this.attributeTags[2])) {
        return;
    }

    this.attributes[this.attributeTags[2]] = value;
    this.updatePreview(true);
};
Only three attributes can be directly defined while inserting the block, that is correct.

If you have more attributes, you can simply insert the block using default values and then fill in the attributes using the property editor as shown in:
http://www.youtube.com/watch?feature=pl ... Mpbw#t=167

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

Re: Block Attributes limited?

Post by Husky » Thu Sep 19, 2013 7:17 pm

andrew wrote:You can quick-fix it by appending these lines to the file scripts/Block/InsertBlock/InsertBlock.js at the bottom
Works, thanks for the fast fix! :D

Still playing with this nice, powerful new features:
And again a question: 8)
Can I do anything with "Attribute/ define Block Attribute outside of a block? Why I question that is because I'm wondering why this option is not only available in an "edit block content" session. I can use it all time in my standard drawing session ...

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

Re: Block Attributes limited?

Post by andrew » Fri Sep 20, 2013 12:10 pm

Husky wrote:Can I do anything with "Attribute/ define Block Attribute outside of a block?
Not yet, but attributes in the main drawing (model space) are allowed for future use (e.g. use of attributes for part library items or XRefs).

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

Re: Block Attributes limited?

Post by Husky » Fri Sep 20, 2013 7:05 pm

andrew wrote:Not yet, but attributes in the main drawing (model space) are allowed for future use (e.g. use of attributes for part library items or XRefs).
Good to know - thanks! :wink:

Post Reply

Return to “QCAD Troubleshooting and Problems”