CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 5696

CAD tip CAD tip # 12701:

Question CAD 
 %  platform  category 
Q - question

What is the maximum length of a list in AutoCAD VisualLISP?

A - answer AutoLISP and VisualLISP in AutoCAD is - as any LISP implementation - based on lists.

If you create long lists in your add-on application, e.g. lists of points, you may be afraid of a possible limit on list size.

VisualLISP (tested in AutoCAD 2021) has no fixed limit on list sizes. List length is limited only by the memory available for storing LISP lists.

The results may differ depending on the complexity of the list elements, but as a result of a practical test, the 64bit version of AutoCAD allows to create lists of simple elements (atoms) longer than 21 million items. Alas, around the level of 21.000.000, adding of more elements slows down substantially, probably the list storage memory gets virtualized. This can be confirmed by making the list elements more complex - if you store e.g. a sublist of 4 real numbers instead of a single number in such long list, the slowdown limit gets as low as about 4.500.000 elements.

You can download or testing LISP code here: maxlist.lsp (just drag it into your AutoCAD window).

100% *  CAD 
18.8.2020    7287×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 13653:FPoly - draw fixed-length polylines in AutoCAD.
Tip 13221:Attractor - snap multiple objects to existing points/vertices.
Tip 12105:Select the smallest DWG object - MinOf utility.
Tip 11726:Loading 3D models in the OBJ file format to AutoCAD.
Tip 11295:Iterative Move, Scale and Rotate - till boundary touch.

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Export 3D VRML scenes from AutoCAD and Inventor
VRMLout More info

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.