Display block names

Discussion in 'AutoCAD' started by Big 'D', Jan 24, 2005.

  1. Big 'D'

    Big 'D' Guest

    I know this one has to already exist. I know Softdesk had it before they were purchased by Autodesk. I need to show the names of the blocks on my drawing. What I would like is for the name to show next to the block and show the insertion point of each block. I need this for training purposes (ie: to show title border/blocks with requires blocks and info). Anyone know of anything?

    Thanks,
    D
     
    Big 'D', Jan 24, 2005
    #1
  2. Big 'D'

    ECCAD Guest

    ;; BN.LSP Control Systems & Services, Inc.
    ;; Visit me at: http://www.bobscadshop.com

    (DEFUN C:BN ()
    ; comment out next 2 lines if you don't want a point at the insertion point
    (setvar "PDMODE" 2)
    (setvar "PDSIZE" 0.5); Size of Point Marker

    (setq bn "" chk nil); set block name nil
    (while (= chk nil)
    (setq chk (entsel "\nPick a Block: "))
    ); end while

    (setq pp (cadr chk))
    (setq chk (entget (car chk)))
    (setq bn (cdr (assoc 2 chk))); get block name
    (setq ip (cdr (assoc 10 chk))); get insertion point

    (setq A (car (getvar "LIMMAX")))
    (if (> A 40)
    (setq TSIZ "0.5")
    (setq TSIZ "0.1875")
    ); end if

    (setq ipt (getpoint "\nPlace Block Name Where <center justified> : "))
    (if (/= bn "")
    (command "_text" "_c" ipt TSIZ "0" bn); apply block name
    ); end if
    (if (= bn "")
    (prompt "\nCannot find the Blockname ?? : ")
    ); end if

    ; comment out next line if you don't want a point at the insertion point
    (command "_point" ip); place a point at the insertion point

    (setq ip nil bn nil chk nil pp nil A nil ipt nil); cleanup
    (princ)
    ); end function

    Cheers :)
    Bob
     
    ECCAD, Jan 25, 2005
    #2
  3. Big 'D'

    Big 'D' Guest

    Thank you Bob. Exactly what I needed! I appreciate you sharing this with me.

    Have a great day!

    D
     
    Big 'D', Jan 25, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.