TheSwamp

Code Red => VB(A) => Topic started by: Guest on January 10, 2008, 03:26:36 PM

Title: Does a block have attributes?
Post by: Guest on January 10, 2008, 03:26:36 PM
What's the best/easiest way to determine if a block has attributes?  I'm counting blocks based on layers, and if a block has an attribute it's being totalled based on the number of similar attribute values and if the block DOESN'T have attributes, it's just being totalled based on the number of occurrences of that particular block.

Is there a DXF code for blocks that don't have attributes?


(back to googling)
Title: Re: Does a block have attributes?
Post by: ronjonp on January 10, 2008, 03:30:04 PM
Not sure in VBA...but DXF (66 . 1) is a block with attributes.

From the help:

Quote
66
 Variable attributes-follow flag (optional; default = 0); if the value of attributes-follow flag is 1, a series of attribute entities is expected to follow the insert, terminated by a seqend entity
Title: Re: Does a block have attributes?
Post by: SomeCallMeDave on January 10, 2008, 03:33:08 PM
A BlockReference has a HasAttributes property
Title: Re: Does a block have attributes?
Post by: Guest on January 10, 2008, 03:36:29 PM
A BlockReference has a HasAttributes property

Awwwww, man!  I forgot all about that one.  I was so focused on the GetAttributes and if GetAttributes was null (or something) then the block doesn't have attributes.


Thanks for the smack in the face!!  :-)