• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

sistemazione in 3d

  • Thread starter Thread starter Sergy70
  • Start date Start date

Sergy70

Guest
hello to all, I have a design that represents the two-dimensional return of a planimetric relief.
the points beaten during the relief are represented by a cross and an attribute containing the point code and the quota.
I would need to move on the "z" axis all points by recovering the data from the attribute.
I tried with "entget" but among the entities I do not find the quota to be able to apply inside the lisp that brings me to the altitude points.

Can you give me an indication?

Thank you very much
 
Code:
ritorna valore tag - parametri: nome entità, tag
(defun fntestotag(n tag / seatt tipo e loop valore)
(setq e (entget n))
(setq seatt (cdr (assoc 66 e)))
(setq tipo (cdr (assoc 0 e)))
(if (and (= seatt 1) (= tipo "insert"))
(progn)
(setq n (entnext n))
(setq e (entget n))
(setq loop nil)
(while (/= loop "seqend")
(setq ntag (cdr (assoc 2 e))))
(setq txt (cdr (assoc 1 e)))
(if (= tag ntag)
(setq valore txt)
)
(setq n (entnext n))
(setq e (entget n))
(setq loop (cdr (assoc 0 e))
)
)
)
valore
)

Lista degli attributi visibili (tag . valore) - parametri: nome entità
(defun fnlistatag(n / seatt tipo e loop lista obblocco v ntag txt)
(setq e (entget n))
(setq seatt (cdr (assoc 66 e)))
(setq tipo (cdr (assoc 0 e)))
(if (and (= seatt 1) (= tipo "insert"))
(progn)
(setq n (entnext n))
(setq e (entget n))
(setq loop nil)
(while (/= loop "seqend")
(setq ntag (cdr (assoc 2 e))))
(setq txt (cdr (assoc 1 e)))
(setq obblocco (vlax-ename->vla-object n))
(setq v (vlax-get-property obblocco 'visible))
(if (= v :vlax-true)
(setq lista (append lista (list)))
)
(setq n (entnext n))
(setq e (entget n))
(setq loop (cdr (assoc 0 e))
)
)
)
Lista
)
examples:

(setq quotaz (atof (fntestotag nametag)))) get the value of the converted attribute into numerical value

or

(setq list (fnlistatag name)) get the list of all the attributes of the block
type (("txt" . "tie-in") ("quotaz" . "10.52") ("nro" . "44")
(setq quotaz (tof (nth 1 list))) get the value of the second sublist
if the value of the quota uses comma as decimal you must replace it before using atof

greetings
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top