AUTODESK Community of Experts,
I would like to know if it is possible to automatically enumerate an integer value field with name INTERNO_SENAL from an OD table with name SDM_SEN_SENALIZACION in AutoCAD MAP 3D through a LISP, knowing that when enumerating the blocks that represent vertical signals these must be enumerated from an initial range to a final numeric range, and that these blocks have an associated OD table (SDM_SEN_SENALIZACION) with two fields: INTERNO_SENAL and TIPO_SENAL, in addition to the fact that the dynamic block that represents the signal types have attributes, which the label with the INTERNAL name must remain same as the value of the OD INTERNO_SENAL field; I was researching on this topic in the forums related to DO management and management from AUTODESK and I found very good material but when adapting it to my proposal it generates an error, I leave the code program with which I was supporting myself and a screenshot of As a vertical sign block should look, I appreciate your help in advance.
(defun c: addid ()
(setq tn (getstring "\ nEntrar el nombre de la tabla:"))
(mensaje "Seleccionar señales") (princ)
(setq ss (ssget))
(setq len (sslength ss))
(setq inc 0 )
(repetir len
(setq enam (ssname ss inc))
(setq id (strcat (itoa (+ 1 inc))))
(setq idd id)
(ade_odaddrecord enam tn)
(ade_odsetfield enam tn "id" 0 idd)
(comando "chprop" enam "" "c" "
)
(alerta "Se actualizaron las entidades seleccionadas con INTERNO_SENAL")
(princ)
)