Not at all brams
The idea is ok, just needs fine tuning.
Look into this _GetClosestTextTo sub-function: Renderman < post #6
HTH
Registered forum members do not see this ad.
So, now, i suppose Pbe won't ask me again to show my code. You like it, Pbe? The best code on the site!
Not at all brams
The idea is ok, just needs fine tuning.
Look into this _GetClosestTextTo sub-function: Renderman < post #6
HTH
I've copied the code that I previously linked here.
Perhaps localized variables would be useful? Otherwise running the code multiple times would provide some interesting results.
Cheers, Pbe![]()
"Potential has a shelf life." - Margaret Atwood


Registered forum members do not see this ad.
Brams, this is what you need?
Code:(defun C:PZ ( / *error* ss i en el p p1 echo) (setq echo (getvar 'cmdecho)) (setvar 'cmdecho 0) (command "UNDO" "BE") (defun *error* (msg) (if msg (princ msg)) (command "UNDO" "E") (setvar 'cmdecho echo) (princ) ) (princ "\nSELECTEAZA PUNCTELE SI TEXTELE") (if (setq ss (ssget '((0 . "TEXT,POINT") (8 . "Puncte,Cote")))) ; <- de modificat numele layerelor (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i)))) (if (setq z (cdr (assoc 1 (setq el (entget en))))) (progn (setq p (assoc 10 el) p1 (list 10 (cadr p) (caddr p) (atof z)) ) (entmake (list '(0 . "POINT") '(8 . "Puncte") p1)) (entmod (subst p1 p el)) ) (entdel en) ) ) ) (*error* nil) (princ) )
Bookmarks