@ reimer, bedankt, deze oplossing heeft het juiste resultaat
Deze sectie stelt je in staat om alle bijdragen van dit lid te bekijken. Je kunt alleen de bijdragen zien waar je op dit moment toegang toe hebt.
Toon bijdragen Menu(command "SELECT" blocksel "")
"select"
!blocksel
(command "-INSERT" (strcat bloknaam "=" fullfile) nil)
(command-s "ATTSYNC" "N" bloknaam)
; this program let's u copy txt sequentially
; read txt write txt read write, read write....
;
(defun c:xFT (/ cntr ent atortxt modtxt txtormtxt dimortxt seldimt strdimedit el mt selatt )
(setvar "cmdecho" 0)
(setq cntr 0)
(while (< cntr 10)
(setq ent (nentselp "Select source Text: " ))
(if ent
(progn ;1
(setq atortxt (cdr(assoc 1 (entget (car ent )))))
(setq modtxt (nentselp "\n Select Text to modify: "))
(if modtxt
(progn ;2
(setq txtormtxt (cdr(assoc 0 (entget (car modtxt )))))
(cond
((or (= txtormtxt "TEXT")(= txtormtxt "MTEXT"))
(progn ;3
(setq dimormtxt (cdr(assoc 42 (entget (car modtxt )))))
(if (/= dimormtxt nil)
(progn ;4
(setq seldimt (cdr (assoc -1 (entget (car modtxt )))))
(setq strdimedit (substr atortxt 5 (strlen atortxt)))
(command "dimedit" "n" strdimedit seldimt "")
) ;progn4
(progn ;5
(setq el (entget (car modtxt )))
(setq mt (subst (cons 1 atortxt) (assoc 1 EL) EL))
(entmod mt)
) ;progn5
) ;if
) ;progn3
) ;cond or
((= txtormtxt "ATTRIB")
(progn ;6
(setq selatt (cdr (assoc -1 (entget (car modtxt )))))
(command "-attedit" "" "" "" "" selatt "v" "r" atortxt "")
) ;progn6
) ;cond or
(T (princ "\n Invalid Selection... "))
) ;cond
) ;progn2
) ;if
) ;progn1
) ;if
);while
(princ)
) ;defun