Jump to content

Leaderboard

Popular Content

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

  1. Build a selection set of blocks with attributes. for each block step thought each attribute and save the "type" and "manufacturer_code" if type is a matches a predefined list '("Base Cabinets" "Wall Cabinets" "Tall Cabinets") then get a bounding box of the current block. calculate the mid point and create text with the "manufacturer_code" at the mid point. ;;----------------------------------------------------------------------------;; ;; Pull Manufacturer_Code for cabinets and input them center of block (defun C:CAB-Label (/ Drawing ss blk atts att typ man minpt maxpt MPT) (vl-load-com) (setq i 0) (vla-startundomark (setq Drawing (vla-get-activedocument (vlax-get-acad-object)))) (prompt "\nSelect Blocks: ") (while (setq ss (ssget '((0 . "INSERT") (66 . 1)))) ;allows user to make multiple selections (setvar 'cmdecho 0) (foreach blk (mapcar 'vlax-Ename->Vla-Object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) (setq atts (vlax-invoke blk 'getattributes)) (setq typ "" man "") (foreach att atts (cond ((= (vla-get-tagstring att) "Type") (setq typ (vla-get-textstring att)) ) ((= (vla-get-tagstring att) "Manufacturer_Code") (setq man (vla-get-textstring att)) ) ) ) (if (member typ '( "Base Cabinets" "Wall Cabinets" "Tall Cabinets")) ;update list for other blocks (progn (vla-GetBoundingBox blk 'minpt 'maxpt) (setq MPT (mapcar '/ (mapcar '+ (vlax-safearray->list minpt) (vlax-safearray->list maxpt)) '(2 2 2))) (entmake (list '(0 . "TEXT") (cons 10 MPT) (cons 11 MPT) (cons 40 (getvar 'textsize)) (cons 1 man) '(62 . 1) '(72 . 1) '(73 . 2))) (setq i (1+ i)) ) ) ) ) (prompt (strcat "\n" (itoa i) " Cabinets labeled")) ;message at the end (vla-endundomark Drawing) (setvar 'cmdecho 1) (princ) )
    1 point
  2. Yeah, the DIMZIN is the supervisor for the RTOS function conduct along with LUPREC , and you can review the quite many options that the DIMZIN variable has.
    1 point
  3. You already have 4 UCS directions set so why not use those when drawing your elevations ? UCS R ucsname Plan. This will rotate the model view to match the house direction. no need to rotate & move elevations. UCS W Plan to go back to real world.
    1 point
  4. Yes there is a way you can pick a cell via a pick point so I guess could make a list of cells picked. Start here https://www.cadtutor.net/forum/topic/34639-how-to-select-the-cell-in-a-table/
    1 point
  5. Hi, Written a tool for replacing (updating) blocks. Had some spare time untill my boss recently used the W-word again (work , yak!) Anywayz , its a prototype so I'm not sure its stable and safe yet because I only did some lab testing. I hope it will be usefull. Not sure if I will be able to work on it further any time soon because I still have a few ideas and wishes. gr. Rlx RlxBlk manual.doc RlxBlk.lsp RlxBlk.dcl
    1 point
  6. For those not already aware of Jeff's (and Jar's) efforts regarding the 'decryption' of Sheet Set (.DST) files, see the .ZIP file at the bottom of this post. Cheers
    1 point
  7. Or Lee "Copy Rename Block" http://www.lee-mac.com/copyblock.html
    1 point
×
×
  • Create New...