Jump to content

Leaderboard

Popular Content

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

  1. @mhupp There is no restriction on your account. I just sent you a message. Let me know if you recieve it.
    1 point
  2. Show me some love and hit the hearts to the right ------->
    1 point
  3. Dear mhupp, Great job! I tested your lsp, it worked for me. Thanks a lot!
    1 point
  4. This is why its important to post all relevant information. 1 Create a new temp layer and draw a rectangle around all geometry you want to block. (better if you use a different color so its easier to see) 2 Use the boundary command and on the island option pick outer. (see attached drawing) 3 Delete the large rectangle and run this ab command. (still needs the Set_BlkName lisp) One problem with this All the original perimeter polylines are not in the block. These should be deleted. overkill mabye? Also if you don't mind spam take out the nomutt lines. ;;;======================================================================== (defun C:AB (/ i plist SS SS1 obj LL UR blkname) (vl-load-com) (setq i 0) (setq lay (getvar 'clayer)) (if (setq SS (ssget "X" (list (cons 0 "LWPOLYLINE") (cons 8 lay)))) (progn (setvar 'nomutt 1) (repeat (sslength SS) (setq plist (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (ssname SS i))))) (setq SS1 (ssget "_WP" plist)) (vl-cmdf "_.chprop" (ssname SS i) "" "LA" "0" "") ;everything was on layer 0 if you need it on a diffrent layer change it here (vl-cmdf "_.Select" SS1 (ssname SS i) "") (setq SS2 (ssget "_P")) (Set_BlkName) (setvar 'attreq 0) (setq obj (vlax-ename->vla-object (ssname SS i))) (vla-getboundingbox obj 'minpt 'maxpt) (setq LL (vlax-safearray->list minpt)) ;lower left point (setvar 'cmdecho 0) (vl-cmdf "_.Block" blkname "none" LL SS2 "") (vl-cmdf "_.Insert" blkname "none" LL 1 1 0) (setvar 'cmdecho 1) (setvar 'attreq 1) (setq i (1+ i)) ;(prompt (strcat "\nBlock [" blkname "] Created. ")) ;with nomutt on will not display ) (setvar 'nomutt 0) ) ) (if (setq SS (ssget "X" (list (cons 8 lay)))) ;selects everything on temp layer (progn (setq i (sslength SS)) (setq i (rtos i 2 0)) (prompt (strcat "\n" i " Objects Moved to 0 layer")) (setvar 'nomutt 1) (vl-cmdf "_Chprop" SS "" "LA" "0" "") (setvar 'clayer "0") (vl-cmdf "_Purge" "LA" lay "N") (setvar 'nomutt 0) ) ) (setvar 'nomutt 0) (princ) ) Testblock.dwg
    1 point
  5. its not perfect nor will it ever win a price for prettiest programming style but it works well for me and my colleagues. Have made some parts a little bit more modern but found out that old school programming (vanilla) sometimes is much faster than vla- commands so decided to stick with vanilla on this one. It is mainly used for text en attributes and sometimes it tolerates mtext. But hey , it's allmost 25 years old and still one of my most valued appies by my colleagues so it must be doing something right hey
    1 point
  6. 'Ribbon Control Elements' can only be used in the Ribbon and the QAT, they cannot even be used in a Toolbar. As Shortcut Menu items aren't static but picked to execute a task I wouldn't think even a drop-down scroller like the old Toolbar layer selector would work as a Shortcut item.
    1 point
×
×
  • Create New...