1. Home
  2. /
  3. Autolisp
  4. /
  5. Draw Concentric Circles

Draw Concentric Circles - Autolisp Typing CST Test

Loading…

Draw Concentric Circles — Autolisp Code

Draws concentric circles with increasing radii.

(defun c:ConcentricCircles ()
	(setq center (getpoint "\nCenter point: "))
	(setq radius 2)
	(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 LineAutoLISP Loop to Draw Multiple CirclesDraw Rectangle Using AutoLISPDraw a Polyline in AutoLISPMove Selected ObjectsScale Selected ObjectsRotate Selected ObjectsErase Selected ObjectsCreate Text at a Point

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher