1. Home
  2. /
  3. Autolisp
  4. /
  5. Loop to Draw Multiple Circles

Loop to Draw Multiple Circles - Autolisp Typing CST Test

Loading…

Loop to Draw Multiple Circles — Autolisp Code

This AutoLISP script draws 5 circles with increasing radii at a fixed center point.

(defun c:DrawCircles ()
	(setq center (getpoint "\nSelect center point: "))
	(setq radius 1)
	(repeat 5
		(command "_.CIRCLE" center radius)
		(setq radius (+ radius 2))
	)
	(princ)
)

Autolisp Language Guide

AutoLISP is a dialect of the Lisp programming language built specifically for automating tasks, customizing workflows, and extending functionality within Autodesk AutoCAD software, enabling rapid development of scripts and commands to enhance CAD productivity.

Primary Use Cases

  • ▸Automating drawing modifications
  • ▸Custom command creation
  • ▸Batch plotting and file management
  • ▸Parametric drawing generation
  • ▸Data extraction and CAD reporting

Notable Features

  • ▸Embedded in AutoCAD environment
  • ▸Dynamic interaction with drawing entities
  • ▸Supports creation of custom commands
  • ▸Integrated Visual LISP IDE for development
  • ▸Ability to interface with external files and databases

Origin & Creator

Developed by Autodesk Inc., USA, as an extension of the Lisp programming language for CAD automation.

Industrial Note

Commonly used in AEC (Architecture, Engineering, Construction), mechanical design, civil engineering workflows, and production drafting where repetitive AutoCAD operations need automation.

More Autolisp Typing Exercises

Simple AutoLISP Routine to Draw a LineDraw Rectangle Using AutoLISPDraw a Polyline in AutoLISPDraw Concentric CirclesMove Selected ObjectsScale Selected ObjectsRotate Selected ObjectsErase Selected ObjectsCreate Text at a Point

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher