Hi, I use this code to insert blocks in the drawings. This code insert the block from a specific file in to AutoCAD by picking the insert point.
I want to add an extra option
a) pick a point for insert the block
b) To give the point number and insert the block and this can be for multiple points (The points I use is block attributes ,look test.dwg I insert some points for example)
for example
Insert point ? [point / number]
> number
20
enter
44
enter
46
enter
enter (<--- for exit)
This is the code I use
Code:
(Defun c:DEH ( / dt1 )
(command "_layer" "_m" "DEH" "_c" "33" "" "")
(setq olderr *error*
*error* at_err)
(setvar "blipmode" 0)
(setq osm (getvar "osmode"))
(setvar "cmdecho" 0)
(setq scl (getint "\n Set Scale (50,100,200,250,500,etc) :"))
(setq scl1 (* scl 0.0025))
(setq dt1 (getpoint "\n Select point to insert the block:"))
(command "insert" "c:\\MBL\\DEH1.dwg" dt1 scl1 scl1 0)
(setvar "cmdecho" 1)
(setvar "blipmode" 1)
(setvar "osmode" osm)
(command "setvar" "clayer" "0")
)
Thanks