This routine lets you create a circle that is made of AutoCAD Point entities. A great feature of this routine is that it lets you determine the starting point where the first point will be placed.
Here’s how:
Set the Point Type to a points size and type that is visible by using the DDPTYPE command.
- PCIRC <enter> to start
- Specify the center point for the circle
- Specify the radius (note: there is NO option to specify a diameter…)
- Specify the Starting Point. This is where the first point will be placed
- Specify the number of points that you want the “circle” to be made of.
(vl-load-com) (defun c:pcirc (/ p r u n c lst param delta) (if (and (setq p (getpoint "\nCenter point: ")) (setq r (getdist p "\nRadius: ")) (setq u (getangle p "\nStart angle: ")) (setq n (getint "\nNumber of points: ")) (setq c (entmakex (list '(0 . "CIRCLE") (cons 10 p) (cons 40 r))) ) ) (progn (setq lst (mapcar '(lambda (x) (vlax-curve-getPointAtParam c x)) (repeat n (setq param (cons (+ (cond ((car param)) ((- u (setq delta (/ (* 2. pi) n)))) ) delta ) param ) ) ) ) ) (entdel c) (mapcar '(lambda (x) (entmakex (list '(0 . "POINT") (cons 10 x)))) lst) ) ) (princ) )