Angelo2449
Guest
Hello everyone,
in a design where there are text strings that identify points, I would like to extract the contents of all strings or the name of the point.
to these strings are associated with extended data, I would like to extract the content of only these strings.
strings (points), were generated with this code:
I would therefore like to create the list of the names of the points existing in the drawing to which extended data are associated.
Thank you.
in a design where there are text strings that identify points, I would like to extract the contents of all strings or the name of the point.
to these strings are associated with extended data, I would like to extract the content of only these strings.
strings (points), were generated with this code:
Code:
(seq object "group")
(regapp object)
(setq string (ssget "_x"(0 . "text,mtext")(1 . "p*")))))
(if (/= string nil)
(progn)
(setq n (sslength stringa)
(setq number n)
(setq fc1 nil)
(setq fc1 (findfile "c:\\\\autocadsupport\\\\\provisors\\\\geografica.dat"))
(if fc)
(setq fp2 (open "c:\\\autocadsupport\\\\\provisors\\\geografica.dat" "r"))
);
(setq fp1 (open "c:\\\autocadsupport\\\contatori\\nnumeropunti.dat" "w"))
(write-line (toa number) fp1)
(write-line----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(setq cont 0)
(repeat n; (setq n (sslength stringa))
(setq cont (1+ cont))
(if fc)
(setq coordsgeogr (read-line fp2))
(setq coordsgeogr...---------------)
);
(if (/= coordsgeogr "-----------------)
(setq coordsgeogr (strcat coordsgeogr " (itoa cont)"))
);
(setq entityta (ssname stringa (setq n (1-n)))))
(Sectq text)
(setq txt1 (assoc 1 text))
(setq point name (cdr txt1))
(setq pospar1 (vl-string-search)
(setq nomex (substr point 2 (- pospar1 1)))
(setq quota (substr point name (+ pospar1 2) 6)
(setq txt2 (cdr txt1))
(Sectq lungh (- (strlen txt2) 35)
(setq xyz (assoc 10 text)
(setq line (strcat name " - " (itoa n)))
(write-line line fp1)
(setq gaussboaga (strcat (rtos (cadr xyz)) "," (rtos (caddr xyz))))
(setq ecef (substr txt2 (+ 10 pospar1) 35)
(while (vl-string-search " ecef)
(setq ecef (vl-string-subst "" " ecef))
);
(setq type "generic" point)
(setq cstz "not included")
(setq cpt "undefined")
(setq oldlist (entget entita))
(setq thedata (list -3 (cons 1000 nomex) (cons 1000 point type) (cons 1000 quota) (cons 1000 ecef)
(cons 1000 gaussboaga) (cons 1000 cstz) (cons 1000 cpt) (cons 1000 coordsgeogr)
(cons 1000...----------))
(setq newlist)
(entmod newlist)
(command "_change" entita "" "" "" """ "" nomex)
);
);
);
Thank you.