Function Entry: SNVALID
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: SNVALID
Name
snvalid
Class
Function
Syntax
(snvalid sym_name [flag])
Arguments and Values
- `symname`: string; a candidate symbol-table name.
flag(optional): integer controlling vertical-bar handling.0(default): vertical bars are disallowed.1: vertical bars are allowed except as the first or last character.
Description
Validates a symbol-table name against AutoCAD naming rules. The rules depend on the EXTNAMES system variable:
EXTNAMES = 1(default): extended naming. Most characters are accepted, except< > / \ " : ? * | , = ;.-EXTNAMES = 0: restrictive naming. Only A–Z, 0–9,$,_, and-are accepted.
Control characters, graphic characters, the empty string, and vertical bars at name boundaries are always rejected.
Return Values
Returns T when the name is valid; otherwise nil.
Side Effects
None.
Examples
With EXTNAMES = 1:
(snvalid "hocus-pocus")returns T.(snvalid "hocus pocus")returns T.(snvalid "hocus|pocus")returns nil.(snvalid "hocus|pocus" 1)returns T.
With EXTNAMES = 0:
(snvalid "hocus-pocus")returns T.(snvalid "hocus pocus")returns nil.
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: presumed compatible.
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [snvalid (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-2EFBE198-9860-456B-A090-206C743ACB90.htm)
- Status: documented (Phase 3 body fill).