1. Home
  2. /
  3. Autolisp
  4. /
  5. Create Text at a Point

Create Text at a Point - Autolisp Typing CST Test

Loading…

Create Text at a Point — Autolisp Code

Prompts for a point and a string, and creates a text object.

(defun c:CreateText ()
	(setq pt (getpoint "\nInsertion point: "))
	(setq txt (getstring "\nEnter text: "))
	(command "_.TEXT" pt 1 0 txt)
	(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 AutoLISPDraw Concentric CirclesMove Selected ObjectsScale Selected ObjectsRotate Selected ObjectsErase Selected Objects

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher