i know there is autolisp users here some place
14 years ago
General
ok trying to get this to place a circle in the square useing autolisp useing if statement. like if hight is greater than width set cirlce radius to width and if width is greater then hight place radius to that
(defun c:dl ()
(setvar "cmdecho" 0)
(initget 7)
(setq hight(getreal "\nenter the hight:"))
(initget 7)
(setq width(getreal "\nenter the width:"))
(setq stpt (list 0 0 0))
(setq pt1 (list Width 0))
(setq pt2 (list width hight 0))
(setq pt3 (list 0 hight 0 ))
(command "line" stpt pt1 pt2 pt3 stpt "")
(if (> hight width)
(setq Rad hight)
(setq Rad width)
)
(Setq cnpt (list (/ width 2.0) (/ hight 2.0)))
(command "circle" cnpt rad)
(princ)
) ;defun
as well as make a circle in frame donig with thickness frame so loks sort of lieka dollar bill almost
(defun c:dl ()
(setvar "cmdecho" 0)
(initget 7)
(setq hight(getreal "\nenter the hight:"))
(initget 7)
(setq width(getreal "\nenter the width:"))
(setq stpt (list 0 0 0))
(setq pt1 (list Width 0))
(setq pt2 (list width hight 0))
(setq pt3 (list 0 hight 0 ))
(command "line" stpt pt1 pt2 pt3 stpt "")
(if (> hight width)
(setq Rad hight)
(setq Rad width)
)
(Setq cnpt (list (/ width 2.0) (/ hight 2.0)))
(command "circle" cnpt rad)
(princ)
) ;defun
as well as make a circle in frame donig with thickness frame so loks sort of lieka dollar bill almost
FA+
