Hello,
I'm working on an AutoLISP script to create labels with a selection of entities from multiple Feature Layers in AutoCAD. When using Esri_Attributes_Get with an entity name and without specifying a feature layer I'm failing to see the domained values i expect to see. For example; returning 6 vs '6"' or 32 vs 'Cast Iron Pipe'.
In another script of mine that labels an entire feature layer and uses the "FLNAME" argument the values come in with the correct domain description. Below is a snippet of my script.
(defun c:LabelSelection (/ feats featsLength featsCount entList entName fieldCount label featureAttributes)
(setq feats (ssget '((-4 . "<NOT") (0 . "*POLYLINE") (-4 . "NOT>"))))
(setvar "CMDECHO" 0)
(setvar "osmode" 0)
;if selection exists continue
(if feats
;determine number of features and get all entities into a list and that list length
(progn
(setq featsLength (sslength feats))
(setq featsCount 0)
(setq entList nil)
(repeat featsLength
(setq entName (ssname feats featsCount))
(if entName
(setq entList (cons entName entList))
);if
(setq featsCount (+ 1 featsCount))
);progn
(setq entList (reverse entList))
;for each entity get its attributes
(foreach entName entList
(setq fieldCount 0)
(setq label "")
(setq fieldsToLabel nil) ; Clear previous asset properties
(setq featureAttributes (esri_attributes_get entName))
Is there any way to get this to return the domain values?
Also is it possible to get LISP as a code sample language?