CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 3813 

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).

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

See also:
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.
Tip 9042:Random scatter of AutoCAD drawing objects - SCATTER.
Tip 7171:How to set a fixed size for a drawing window?


Back   All CAD Tips All CAD tips&tricks



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   



Featuring:
Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 More info


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