Search the Community
Showing results for tags 'autocad civil 3d'.
Found 3 results
LISP: Increase consecutive number & Object data to block attribute
BRIAM RAMON posted a topic in AutoLISP, Visual LISP & DCLI would like to merge the lisps I show at the end into one, where the process is first ADDID.lsp and then OD2ATT.lsp If it were possible with your help to add a new functionality to addid.lsp and that is that when you copy the block name in the TIPO_SENAL field of the Object Data You can check the block name to be able to change it to another, with some examples it would be enough to add as many times as this operation is necessary. thank you very much, greetings .... (defun c:ADDID (/ n inc enam idd efn) (setq tn "SDM_SEN_SENALIZACION") (prompt "Seleccionar señales") (princ) (setq n (getint "\n Ingrese valor de Inicio: ") ss (ssget '((0 . "insert"))) ) (setq inc 0) (repeat (setq len (sslength ss)) (setq enam (ssname ss inc)) (setq idd (itoa n)) (setq efn(vla-get-effectivename(vlax-ename->vla-object enam))) (ade_odaddrecord enam tn) (ade_odsetfield enam tn "INTERNO_SENAL" 0 n) (ade_odsetfield enam tn "TIPO_SENAL" 0 efn) (command "chprop" enam "" "c" "ByLAyer" "") (setq inc (1+ inc) n (1+ n) ) ) (alert "The entities selected with INTERNO_SENAL were updated") (princ) ) .... (defun c:OD2ATT (/ ss) (vl-load-com) (if (setq ss (ssget '((0 . "INSERT") (2 . "`*U*")))) ((lambda (i / e s od r v n d tag) (while (setq e (ssname ss (setq i (1+ i)))) ;; Extract object data (setq b (ade_odgetfield e (setq od (car (ade_odgettables e))) "INTERNO_SENAL" 0)) ;; Populate attributes (if (and (setq n (vla-get-effectivename (setq v (vlax-ename->vla-object e)))) (setq d (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) n))) (foreach attrib (vlax-invoke v 'getattributes) (vlax-for item d (if (= (vla-get-objectname item) "AcDbAttributeDefinition") (if (= (vla-get-tagstring attrib) (vla-get-tagstring item)) (cond ((= "INTERNO" (setq tag (vla-get-tagstring item))) (vla-put-textstring attrib b)))))))) )) -1)) (princ)) ADDID.lsp OD2ATT.lsp eg.dwg
Thing to check when borders come out with improper lineweights?
Oscar posted a topic in AutoCAD Drawing Management & Output
Oscar posted a topic in AutoCAD Beginners' AreaI struggle understanding how to scale objects properly. I know how to use the command and all but I don't really see how my co-workers figure out the scale factor. I think they look at the scale on the drawing like a 1/4"= 1' and go by that when I bring in blocks or text. I guess I am looking for someone to point me in the direction of a helpful video or explain it to me like Im 5 haha.