Autolisp Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
AutoCAD 2012 for Mac AutoLISP Reference Guide July 2011 © 2011 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. Certain materials included in this publication are reprinted with the permission of the copyright holder. Trademarks The following are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and other countries: 3DEC (design/logo), 3December, 3December.com, 3ds Max, Algor, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI, AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk Envision, Autodesk Intent, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap, AutoSketch, AutoTrack, Backburner, Backdraft, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Civil 3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer, Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer, DesignStudio, Design Web Format, Discreet, DWF, DWG, DWG (logo), DWG Extreme, DWG TrueConvert, DWG TrueView, DXF, Ecotect, Exposure, Extending the Design Team, Face Robot, FBX, Fempro, Fire, Flame, Flare, Flint, FMDesktop, Freewheel, GDX Driver, Green Building Studio, Heads-up Design, Heidi, HumanIK, IDEA Server, i-drop, ImageModeler, iMOUT, Incinerator, Inferno, Inventor, Inventor LT, Kaydara, Kaydara (design/logo), Kynapse, Kynogon, LandXplorer, Lustre, MatchMover, Maya, Mechanical Desktop, Moldflow, Moonbox, MotionBuilder, Movimento, MPA, MPA (design/logo), Moldflow Plastics Advisers, MPI, Moldflow Plastics Insight, MPX, MPX (design/logo), Moldflow Plastics Xpert, Mudbox, Multi-Master Editing, Navisworks, ObjectARX, ObjectDBX, Open Reality, Opticore, Opticore Opus, Pipeplus, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProjectPoint, ProMaterials, RasterDWG, RealDWG, Real-time Roto, Recognize, Render Queue, Retimer,Reveal, Revit, Showcase, ShowMotion, SketchBook, Smoke, Softimage, Softimage|XSI (design/logo), Sparks, SteeringWheels, Stitcher, Stone, StudioTools, ToolClip, Topobase, Toxik, TrustedDWG, ViewCube, Visual, Visual LISP, Volo, Vtour, Wire, Wiretap, WiretapCentral, XSI, and XSI (design/logo). All other brand names, product names or trademarks belong to their respective holders. Disclaimer THIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS. Published by: Autodesk, Inc. 111 McInnis Parkway San Rafael, CA 94903, USA Contents Chapter 1 AutoLISP Functions . 1 AutoLISP Functions . 1 Operators . 1 + (add) . 1 - (subtract) . 2 * (multiply) . 3 / (divide) . 4 = (equal to) . 5 /= (not equal to) . 6 < (less than) . 7 <= (less than or equal to) . 8 > (greater than) . 9 >= (greater than or equal to) . 9 ~ (bitwise NOT) . 10 1+ (increment) . 11 1- (decrement) . 12 A Functions . 12 abs . 12 acad-pop-dbmod . 13 acad-push-dbmod . 13 acad_strlsort . 14 acad_truecolorcli . 15 acad_truecolordlg . 16 acdimenableupdate . 17 iii acet-layerp-mode . 18 acet-layerp-mark . 19 alert . 20 alloc . 21 and . 21 angle . 22 angtof . 23 angtos . 24 append . 25 apply . 26 arx . 26 arxload . 27 arxunload . 28 ascii . 28 assoc . 29 atan . 30 atof . 31 atoi . 31 atom . 32 atoms-family . 33 autoarxload . 34 autoload . 34 B Functions . 35 Boole . 35 boundp . 37 C Functions . 38 caddr . 38 cadr . 39 car . 39 cdr . 40 chr . 41 close . 41 command . 42 command-s . 44 cond . 48 cons . 49 cos . 50 cvunit . 51 D Functions . 52 defun . 52 defun-q . 53 defun-q-list-ref . 54 defun-q-list-set . 55 dictadd . 56 dictnext . 58 dictremove . 59 iv | Contents dictrename . 60 dictsearch . 61 distance . 62 distof . 63 dumpallproperties . 64 E Functions . 67 entdel . 67 entget . 68 entlast . 69 entmake . 70 entmakex . 72 entmod . 73 entnext . 75 entsel . 77 entupd . 78 eq . 80 equal . 81 *error* . 82 eval . 83 exit . 84 exp . 84 expand . 85 expt . 86 F Functions . 86 findfile . 86 fix . 87 float . 88 foreach . 88 function . 89 G Functions . 90 gc . 90 gcd . 91 getangle . 91 getcfg . 93 getcname . 94 getcorner . 94 getdist . ..