0% found this document useful (0 votes)
5 views2 pages

AARAY

Array object any angle

Uploaded by

bravomikeparle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

AARAY

Array object any angle

Uploaded by

bravomikeparle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

; *****************************************************************

; AARAY.LSP
;
; To Array objects in rectangular fashion at any angle.
; *****************************************************************
;
(defun myerr (s)
(if (/= s "Function cancelled")
(princ (strcat "\nError: " s))
)
(setvar "cmdecho" cm)
(setvar "osmode" os)
(setvar "snapang" sa)
(setq *error* oler)
(princ)
)
(defun c:AAray (/ sa1 a nr nc rd cd)
(setq oler *error*
*error* myerr)
(setq cm (getvar "cmdecho")) (setvar "cmdecho" 0)
(setq os (getvar "osmode")) (setvar "osmode" 32)
(setq sa (getvar "snapang"))
(prompt "\nSelect objects to Angled Array: ")
(setq a (ssget))
(initget 1)
(setq sa1 (getangle "\nAngle of Array: "))
(setvar "osmode" 0)
(setvar "snapang" sa1)
(setq nr (getint "\nNo of Rows <1>: "))
(if (= nr nil) (setq nr 1))
(setq nc (getint (strcat "\nNo of Columns <"(itoa nr)">: ")))
(if (= nc nil) (setq nc nr))
(setvar "osmode" 32)
(if (> nr 1)
(setq rd (getdist "\nDistance between Rows: "))
(setq rd nil)
)
(if (> nc 1)
(progn
(cond ((> nr 1)
(setq cd (getdist (strcat"\nDistance between Columns <"(rtos rd)">: ")))
(if (= cd nil) (setq cd rd))
)
((= nr 1)
(setq cd (getdist "\nDistance between Columns: "))
)
)
)
)
(cond ((and (= nr 1) (> nc 1))
(command "array" a "" "r" nr nc cd)
)
((and (> nr 1) (> nc 1))
(command "array" a "" "r" nr nc rd cd)
)
((and (> nr 1) (= nc 1))
(command "array" a "" "r" nr nc rd)
)
)
(setvar "snapang" sa)
(setvar "cmdecho" cm)
(setvar "osmode" os)
(princ)
)

You might also like