Tutorial: Page (1) of 1 - 09/17/01 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page facebook

Rescaling Blocks Around Insertion Points

By Kevin Simmons
Use the following lisp routine to rescale blocks around thier insertion points - you can select by name. Works great for arrowheads etc.

(defun C:RS()


(setq old (getstring "Enter OLD scale factor: "))

(setq new (getstring "Enter NEW scale factor: "))

(SETVAR "CMDECHO" 0)

(SETQ BN (GETSTRING "Enter block name to scale, or PRESS ENTER for _archarrow: " ))

(IF (= BN "") (setq BN "_archarrow"))

(setq A (SSGET (LIST (CONS 0 "INSERT")(CONS 2 BN))))

(IF (= a nil)(princ "ERROR Block not found!")

(PROGN

(SETQ RSSLN (SSLENGTH A))

(SETQ SSN 0)

(WHILE (< SSN RSSLN)

(PROGN

(SETQ ENT1 (SSNAME A SSN))

(SETQ IP (CDR (ASSOC 10 (ENTGET ENT1))))

(command "SCALE" ENT1 "" IP "R" OLD NEW)

(SETQ SSN (+ 1 SSN))

)

);end while

);end progn

);end if

(princ)

)


Page: 1


Related Keywords:

HOT THREADS on DMN Forums

Our Privacy Policy --- @ Copyright, 2015 Digital Media Online, All Rights Reserved