Hallo,
wir sind vor kurzem von Autocad2009 auf 11 umgestiegen und mussten feststellen, dass das fla-neu lisp leider nicht wie gewohnt funktioniert. Hat ja bisher immer die Fläche eines Polygons als Text ausgegeben bzw wenn man ein weiteres Polygon auswählt eben dieses vom ersten abgezogen und die Fläche ausgegeben - nun funktioniert eben das abziehen des zweiten Polygons nicht mehr.
Hier schnell das Lisp vielleicht weiß ja wer ne Lösung.
-------------------------------------------------------------------
(defun c:fla-neu (/ dd tt t_2 inpkt)
(setq tt nil
dd nil
t_2 nil
inpkt nil
) ;_ end of setq
(setq tt (car (nentsel "Raumpolygon zeigen:")))
(cond
((and (or (= (cdr (assoc 70 (entget tt))) 129)
(= (cdr (assoc 70 (entget tt))) 1)
) ;_ end of or
(= (cdr (assoc 0 (entget tt))) "LWPOLYLINE")
) ;_ end of and
(redraw tt 3)
(terpri)
(princ "Abzugspolygon(e) zeigen:")
(if (setq dd (ssget '((-4 . "<OR")
(-4 . "<AND")
(0 . "LWPOLYLINE")
(-4 . "<OR")
(70 . 129)
(70 . 1)
(-4 . "OR>")
(-4 . "AND>")
(-4 . "<AND")
(0 . "POLYLINE")
(-4 . "<OR")
(70 . 129)
(70 . 1)
(-4 . "OR>")
(-4 . "AND>")
(-4 . "OR>")
)
) ;_ end of ssget
) ;_ end of setq
(progn
(terpri)
(setq md_zaehler 0)
(command "_.area" "a" "_o")
(command tt "")
(command "s" "_o")
(repeat
(sslength dd)
(setq t_2 (ssname dd 0))
(command t_2)
(setq dd (ssdel t_2 dd))
) ;ende rep
(command "" "")
(setq inpkt (getpoint "Einfügepunkt für Flächenwerte:"))
(command "_text"
inpkt
"0.35"
"0"
(rtos (getvar "area") 2 2)
) ;command
) ;progn
(progn
(command "_.area" "_o")
(command tt)
(setq inpkt (getpoint "Einfügepunkt für Flächenwerte:"))
(command "_text"
inpkt
"0.35"
"0"
(rtos (getvar "area") 2 2)
) ;command
) ;progn
) ;if
)
((null (PRINC "Nichts oder Falsch gewählt."))
)
) ;_ end of cond
) ;defun
(princ "\nProgramm ausführen mit >FLA-NEU<")
(princ)
;|«Visual LISP© Format Options» (72 2 40 1 T "end of " 60 9 0 0 0 nil T nil T)
***Don't add text below the comment!***|;
----------------------------------------------------------
danke
markus
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP