; ***************************BLKIN.LSP************************* ; TOOLBOX routines used: ; (LS) Create new layer (Feb '90) ; (RL) Re-set existing layer (Feb '90) ; (V1) Saves original values of system variables (Feb '89) ; (V1R) Restores original system variable values (Feb '89) ; (V3) Start-up routine (Feb '89) ; (V4) Ending routine (Feb '89) ; ------------------------------------------------------------- ; Variables: ; BLK = Block name for material ; LN1 = Attribute for size ; LN2 = Attribute for material or description ; X = X-scale factor ; Y = Y-scale factor ; ; SAMPLE CALL: (BLKIN BLK X Y LN1 LN2) ; ------------------------------------------------------------- (defun BLKIN (BLK X Y LN1 LN2) (V3) ;Start-up (V1 '("snapmode" "attreq" "attdia" "orthomode")) (LS "BLOCK" "7" "") ;Layer/color/linetype (setvar "attreq" 1) ;Attribute prompt on (setvar "attdia" 0) ;Attribute dialogue box off (setvar "orthomode" 1) ;Ortho on (setq SU (getvar "snapunit")) (command "snap" 0.0625 ;Set snap to 1/16" "insert" BLK "xscale" X "yscale" Y pause pause LN1 LN2) (setvar "snapunit" SU) ;Re-set snap unit (V1R) ;Restore original variables (RL) ;Restore original layer (V4) ;Ending routine ) ;End DeFun