Page 1 of 1

Block Attributes limited?

Posted: Thu Sep 19, 2013 9:29 am
by Husky
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 6979 times

Re: Block Attributes limited?

Posted: Thu Sep 19, 2013 9:44 am
by andrew
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

Re: Block Attributes limited?

Posted: Thu Sep 19, 2013 7:17 pm
by Husky
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 ...

Re: Block Attributes limited?

Posted: Fri Sep 20, 2013 12:10 pm
by andrew
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).

Re: Block Attributes limited?

Posted: Fri Sep 20, 2013 7:05 pm
by Husky
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: