To change attribute tag order in one drawing use BATTORDER (AutoCAD) or BATTMAN (AutoCAD and BricsCAD). With it you can update the block definition of the block.
Then wblock out the block to a separate DWG file. In the example below it us C:\temp\TITLEBLOCK.dwg
In below example the block is named TITLEBLOCK so you will need to modify the name and path (separate folders with double backslashes). Save the AutoLISP code to an LSP file.
; redefine block with or without attributes from an external DWG block
(setq blockname " TITLEBLOCK")
(setq fullpath "C:\\temp\\TITLEBLOCK.dwg")
(if (tblsearch "block" blockname)
(progn
(command "_.-insert" (strcat blockname "=" fullpath) "_Y")
(command)
(command "_.attsync" "_N" blockname)
)
)
Then you can use JTB SmartBatch to update all drawings with this LSP. Specify the use of the LSP in JTB SmartBatch Settings > Script/lisp file. Now add all drawings to be updated and you’ll have all title blocks or other blocks of your choice updated.
No comments:
Post a Comment