Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add consecutive INTERNAL in blocks in AutoCAD MAP3D

0 REPLIES 0
Reply
Message 1 of 1
BriamR
405 Views, 0 Replies

Add consecutive INTERNAL in blocks in AutoCAD MAP3D

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

 

Screenshot 2021-03-10 134507.png

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report