I'm trying to create a lisp that modifies the height of a picked individual attribute in all blocks of the same name.
A prolonged Google search didn't come up with much.
There's BATTMAN of course, but in a multi-attributed block it's not always easy to discern which attribute is which, especialy if they've been given a ambiguous name. There's also Lee Macs excellent Redefine_Block_Text but it's redefines all items within a block.
My need is for a lisp which picks an attribute, returns the old height & prompts for a new height, then attsyncs all.
The code I have created works until the block is 'attsynced'. It modifies the height of the attribute, but it returns to the previous size on attsync. I would guess that it's modifying the height of the value of the attribute rather than the tag.
My code so far:
Since you are using ATTSYNC, you can change the height of the attribute definition within the block definition and such changes will be automatically reflected across all references of the block (your current code is changing the height of the attribute reference within a single block reference).
To give some more direction: retrieve the BLOCK_RECORD entity using the tblobjname function, and step through the block component entities using the entnext function; when you encounter the target ATTDEF entity, modify the height in the same way as you have with the ATTRIB entity in your code. Then invoke the ATTSYNC command to apply the change across all references of the block.
To provide more information about the structure of a block definition, see my post here from 2012.
As Lee described earlier that you need to work on the Block definition and not on the Block reference , so I am just giving you an example to show you the way you should go.