(defun c:Test ( / ss) (setq GT "G119") (setq NE "N229") (setq RH 991) (setq HL 1) (setq RT 1) (setq TH 81.0) (setq TK 91.0) ;Raumbeschrifter waehlen (while (/= (if (setq ent (car (entsel "\nRaumbeschrifter waehlen: "))) (progn (setq chk (cdr (assoc 0 (entget ent)))) (setq ename (cdr (assoc 2 (entget ent)))) ;Blockname (if (/= chk "INSERT") (princ "\nKein Raumbeschrifter!") ) ;if chk ) ;progn (princ "\nNICHTS gewaehlt!") ) ;if "INSERT" ) ;/= ) ;while (setq blk_list (ssget "_X" (list (cons 0 "INSERT")(cons 2 ename)))) (if blk_list (progn (setq zaehler 0) (repeat (sslength blk_list) (setq ent (entget (ssname blk_list zaehler))) ;Raum-Beschrifter ;ROOMDATA holen (setq ent0 (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (ENTITY ent)))))))))))) ; (setq ent0 (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (entlast)))))))))))) (setq ent1 (cdr ent0)) ;Daten (princ "\n") (princ ent1) (princ "\n") (setq ent1 (reverse ent1)) ; (setq laenge (length ent1)) ;(300 . G111) Gebaeudeteil (setq neu_list (list (cons 300 GT))) ;(40 . 0.0) (setq neu_list (cons (nth 1 ent1) neu_list)) ;(40 . 0.0) (setq neu_list (cons (nth 2 ent1) neu_list)) ;(300 . N222) Nutzungseinheit (setq neu_list (cons (cons 300 NE) neu_list)) ;(90 . 1) Raumtyp (setq neu_list (cons (cons 90 RT) neu_list)) ;(290 . 0) (setq neu_list (cons (nth 5 ent1) neu_list)) ;(90 . 999) abweichende Raumhöhe in mm (setq neu_list (cons (cons 90 RH) neu_list)) ;(290 . 1) Raum nicht für Lastberechnung verwenden = 1 (setq neu_list (cons (cons 290 HL) neu_list)) ;(40 . 99.0) Kühltemperatur (setq neu_list (cons (cons 40 TK) neu_list)) ;(40 . 88.0) Heiztemperatur (setq neu_list (cons (cons 40 TH) neu_list)) ;(90 . 7) (setq neu_list (cons (nth 10 ent1) neu_list)) ;(280 . 1) (setq neu_list (cons (nth 11 ent1) neu_list)) ;(100 . AcDbXrecord) (setq neu_list (cons (nth 12 ent1) neu_list)) ;(330 . ) (setq neu_list (cons (nth 13 ent1) neu_list)) ;(102 . }) (setq neu_list (cons (nth 14 ent1) neu_list)) ;(330 . ) (setq neu_list (cons (nth 15 ent1) neu_list)) ;(102 . {ACAD_REACTORS) (setq neu_list (cons (nth 16 ent1) neu_list)) ;(5 . 35AF) (setq neu_list (cons (nth 17 ent1) neu_list)) ;(0 . XRECORD) (setq neu_list (cons (nth 18 ent1) neu_list)) (princ neu_list) (princ "\n") (princ "alle Datentypen String nicht als \"...\"?") (princ "\n") ;Name (setq neu_list (cons (car ent0) neu_list)) (princ neu_list) (princ "\n") ;ROOMDATA schreiben (entmod neu_list) (setq zaehler (1+ zaehler)) ) ;repeat ) ;progn ) ;if (textscr) (princ) );defun (defun ENTITY (ele) ;;; Konvertiert das Element zum Typ ENAME (cond ;akzeptiert: ((= (type ele) 'ENAME) ele) ; ENAME ((not (listp ele)) nil) ; error: keine Liste ((= (type (car ele)) 'ENAME) (car ele)) ; entsel Liste ((cdr (assoc -1 ele))) ; entget Liste oder nil ) )