Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using this script to swap out an old template with a new one. However, I want to convert it to a LSP so that I can run it from a tool palette. I currently have to type "script" in the command bar and navigate to the .scr file location, select it, and then hit enter in Autocad to get it to run. I want to simply run it by the tool palette. How can I convert this over?
; script to replace OLD block NEW block
;
; ATTREQ = 0 turns off prompt to fill in attrbutes
attreq
0
;
; insert command to replace
; OLD BLOCK = NEW BLOCK
; new block name needs to include location as shown is spaces in file name needs quotes
;
-insert
"PCS(24x36)_Titleblock=C:\User\AutoCAD\pidblks_dyn\NET(24x36)_Titleblock.dwg"
Y
0,0
1
1
0
;
; variable to turn prompt of attributes back on
;
attreq
1
; erases temporary insert of block (L = last object placed)
erase
L
; ATTSYNC = sinces the attrubutes
attsync
name
PCS(24x36)_Titleblock
;
; command; RENAME to change OLD block name to NEW block name
;
rename
block
PCS(24x36)_Titleblock
"NET(24x36)_Titleblock"
;
; save changes
;
qsave
Solved! Go to Solution.