:mrgreen:Perfect 
Dit laatste programma is precies wat ik zocht, thanx.
Maikel

Dit laatste programma is precies wat ik zocht, thanx.
Maikel
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
(defun Muurtype ( / )
;The next while loop checks for null or invalid selection.
(while (or
(not (setq ePick (nentsel "\nSelect the type of wall: ")))
(< (length ePick) 3)
);end or
(progn (princ "\nObject was invalid or was not selected."))
);end while
(GetList)
)
;;;----------------------------------------------------------------------------------
(defun GetList ( / iNest eList )
(setq iNest (length (last ePick)))
;The next if statement handles block within blocks. iNest = 1 means no nesting. Since (nentsel) goes all the
;way to the root AutoCAD object we have to traverse back up to the top level of the nesting to get a block name.
(if (= iNest 1)
(setq eList (entget (car ePick)))
(setq eList (entget (nth (- iNest 2) (last ePick))))
);end if
;Check Layername (hatch)
(setq sLayer (last (assoc 8 eList))
); end setq
); End GetList