AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN


Break @ Circle.

Have you ever tried breaking a Circle into 2 separate parts using the Break command? It doesn't work does it? This routine allows you to separate a circle into two arcs by picking
two points on the circle.

(defun c:bcirc (/ os pt1 pt2 a pt3)
	(setq os (getvar "osmode"))
	(setvar "osmode" 512)
	(setq pt1 (getpoint "\nFirst Break in Circle : "))
	(setq pt2 (getpoint "\nSecond Break in Cricle : "))
	(setq a (entget (ssname (ssget pt1) 0)))
	(setq pt3 (cdr (assoc 10 a)))
	(command "break" pt1 pt2)
	(command "arc" pt1 "e" pt2 pt3)
	(setvar "osmode" os)
	(princ)
)
(princ)
Pick any 2 points on the a Circle.
The circle will look the same, but it will be broken into two arcs.
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website