LISP to remove only certain attributes from any block in a drawing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm in a unique situation and I've been trying to either create or find a LISP routine solution to my problem.
I have a large quantity of dynamic blocks that I extract coordinate information from. Think a rectangles with 4 corners of data. I use a predefined attribute called "COORDS_1", "COORDS_2", "COORDS_3", "COORDS_4", etc.... all the way up to "COORDS_12". The attributes are fields tied to a "point / node" in the block that return coordinate information as an attribute value.
Since the attributes are predefined - when I redefine the blocks with new attribute data (each block has up to 50 attributes that are updated) - the predefined attributes try to maintain the old "preset" data instead of accepting the new data. I can't use "constant" because the coordinate data won't update with the location in the drawing and only stays constant - referencing the location inside the block.
I've currently written an update lisp that compiles a list of drawing files from a folder, compares the drawing names in the folder with the block names ina drawing. Anything that matches gets redefined and attsync'd to the new values. For the "Coords_#" attributes that are predefined - I would need the lisp routine to first remove any instance of "COORDS_#s" that matches the file names in the folder.
Any pointers or help to point me in the right direction would be great. Thanks!