请从这里尝试这一项:
http://forums . Autodesk . com/t5/Visual-LISP-AutoLISP-and-General/imredoms/TD-p/806704/page/2
- REPLACE.LSP - (Block Replace) - (c) 1990 Richard D. Howard
- all rights reserved - no warranty, express or implied
- The included files may be used and copied for non-profit
- purposes only. If you wish to include any of the files in a
- commercial program, contact the author.
- ---------------
- REPLACE, replaces selected blocks with a specified block,
- retaining all of the original properties. REPLACE handles blocks
- with attribute data correctly, and can optionally allow entry of
- new attributes at runtime. This makes REPLACE ideal for updating
- blocks whose definition has changed (AutoCAD does not updates the
- attributes in such instances). When replacing attributes, REPLACE
- actually erases the old block and substitutes the new one
- retaining as much of the former data as possible. The two fields
- that are definately modified are "entity name", and "handle
- number" (because the block really is new). If you require these
- to remain the same, don't use REPLACE. If no attributes are
- present, REPLACE simply updates the name attached to the original
- block insert. This retains ALL the inserts data, including the
- entity name and handle.
|