Function Entry: ASSOC
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: ASSOC
Name
assoc
Class
Function
Syntax
(assoc item alist)
Arguments and Values
item: key to search foralist: association list
Description
Searches an association list for a dotted pair whose first element matches item.
Return Values
Returns the matching dotted pair or nil.
Side Effects
None.
Examples
(assoc 'size '((name box) (width 3) (size 4.7263) (depth 5))) => (SIZE 4.7263)(assoc 'weight '((name box) (width 3) (size 4.7263) (depth 5))) => nil
Compatibility
This is a central function in CAD database idioms because entity and table data are commonly represented as alists.
The dedicated Autodesk page describes item as an integer, real, or string, but its own examples also use symbols. This inconsistency should be kept visible and eventually tested.
Availability
- AutoCAD 2026: documented (per Autodesk reference page).
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [assoc (AutoLISP)](https://help.autodesk.com/cloudhelp/2026/HUN/AutoCAD-AutoLISP-Reference/files/GUID-46309786-DAF6-4C28-8448-599FBC8A4F6A.htm)
- Status: documented, with noted item-type inconsistency between prose and examples.