Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/31/2021 in all areas

  1. (vl-load-com) (defun c:t4 (/ d o c)(setq c (vla-get-Blocks (setq d (vla-get-ActiveDocument (vlax-get-acad-object))))) (if (and (setq o (entsel "\nSelect block: ")) (block-p (setq o (vlax-ename->vla-object (car o))))) (mapcar '(lambda (n) (vlax-for x (vla-item c n)(vla-put-Color x 0) (vla-put-linetype x "ByBlock") (vla-put-Layer x "0") (vla-put-Lineweight x -2)(vla-put-EntityTransparency x "ByBlock"))) (nb o))) (vla-regen d acAllViewports) (princ) ) ;;; test of object is a block (block-p (vlax-ename->vla-object (car (entsel)))) (defun block-p (o) (and (= 'vla-object (type o))(eq (vla-get-objectname o) "AcDbBlockReference"))) ;;; test if object is block and return name / effective name : (block-n (vlax-ename->vla-object (car (entsel)))) (defun block-n (o) (if (and (= 'vla-object (type o))(eq (vla-get-objectname o) "AcDbBlockReference")) (if (vlax-property-available-p o 'EffectiveName)(vla-Get-EffectiveName o)(vla-Get-Name o)) nil)) ;;; nested block names : test : (nb (vlax-ename->vla-object (car (entsel "\nSelect block: ")))) (defun nb ( b / c l n) (setq c (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object)))) (vlax-for o (vla-item c (block-n b)) (if (and (eq "AcDbBlockReference" (vla-get-ObjectName o)) (not (member (setq n (block-n o)) l)))(progn(setq l (cons n l))(nb o))))(cons (block-n b) l))
    1 point
  2. If you use the region command it gives you a clue as to why it won't work:
    1 point
  3. Dear All, I'm new to this thread and i have following book as a pdf. but I dont have pratice file cd, if anyone know place to download let me know The Aubin Academy Master Series: AutoCAD MEP 2011 Thank you,
    1 point
×
×
  • Create New...