Author Topic: Does a block have attributes?  (Read 2452 times)

0 Members and 1 Guest are viewing this topic.

Guest

  • Guest
Does a block have attributes?
« 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)

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Does a block have attributes?
« Reply #1 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

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

SomeCallMeDave

  • Guest
Re: Does a block have attributes?
« Reply #2 on: January 10, 2008, 03:33:08 PM »
A BlockReference has a HasAttributes property

Guest

  • Guest
Re: Does a block have attributes?
« Reply #3 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!!  :-)