;MYATTIN -
;Imports attribute data from selected file. The file must be of
;the same format as created with ATTOUT.
;
(defun c:myattin ( / fna lklay )
(acet-error-init (list
(list "cmdecho" 0)
0
'(progn
(if lklay
(progn
(acet-sysvar-set '("cmdecho" 0))
(command "_.layer" "_lock" lklay "")
(acet-sysvar-restore)
)
);if need to re-lock
(princ (strcat "\n" (itoa #bns_attin_modified) " Block inserts modified."))
);progn
)
)
(acet-autoload '("yes_no.lsp" "(bns_get_yes_no a b)"))
(setq #bns_attin_modified 0)
(cond
((not (setq fna (acet-ui-getfile "Enter input filename"
(strcat "C:\Dokumente und Einstellungen\All Users\Desktop\Schriftfeld.txt")
(acet-filename-path-remove (acet-filename-ext-remove (getvar "dwgname")))
".txt"
);strcat
"txt"
""
1664
)
)
)
(princ "\nNo input file selected.")
);cond #1
((setq fna (findfile fna))
(setq lklay (acet-layer-unlock-all))
(if (equal 4 (logand 4 (getvar "cmdactive")))
(bns_attin fna nil);a script is running so no interactive placement
(bns_attin fna T);Allow interactive placement
);if
(if lklay
(command "_.layer" "_lock" lklay "")
);if
(princ (strcat "\n" (itoa #bns_attin_modified) " Block inserts modified."))
);cond #2
);cond close
(acet-error-restore)
);defun c:myattin
so sieht das bei mir nun aus...
steh grad sowas von am schlauch
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP