Filter by attribute with Field

Filter by attribute with Field

Anonymous
Not applicable
2,936 Views
2 Replies
Message 1 of 3

Filter by attribute with Field

Anonymous
Not applicable

I would like to select all of the blocks with the same attribute value in order to assign a part number to all parts of the same length. This value is based on a field which pulls the length of the centerline (a polyline consisting of straight and radial sections) of the part to produce the flat length. I had no problem getting the attribute to update (after a regen) with the correct length when a stretch action is performed.

 

My problem is that I can't find a way to select all the parts with the same field-generated value. I've tried several lisps, including one by Lee Mac (here), but to no avail. Even if I copy the text directly from the Attribute Value in the block's Properties window and paste it into the command line when prompted, I cannot get it to work. It seems that AutoCAD does not recognize the text since the field displays as "######" (with gray text fill to represent the field) when you go to edit the attribute by double clicking. Is there a way to achieve this goal? Does anybody have experience filtering attributes populated with fields?

 

Thanks,

 

Will O

0 Likes
Accepted solutions (1)
2,937 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Well, I figured it out on my own:

 

If you use the attached lisp (compliments of Lee Mac), you can filter by any block name or attribute definition, then as long as you type the field's text exactly as it displays in the properties pane under the specific attribute that you are trying to find, viola you got your blocks.

 

Seems to have worked so far, I'll let you know if I run into any issues with it. 

0 Likes
Message 3 of 3

aadish_rahman
Contributor
Contributor
thanks
0 Likes