Filename block

Discussion in 'AutoCAD' started by John Mayo, May 5, 2004.

  1. John Mayo

    John Mayo Guest

    Can someone please give me a quick rundown on how to get a block with the
    dwg filename into a title block? I started to browse the Help files
    searching Attributes & Filename without any luck.

    John Mayo
     
    John Mayo, May 5, 2004
    #1
  2. John Mayo

    Vaidas Guest

    hello,

    ;the simpliest way to insert filename text:

    (command "text" (getpoint "\nfilename text insertion point :") "3" "0" (strcat (getvar "dwgprefix")(getvar "dwgname")))

    ;change "3" to text size you are using

    regards,
    Vaidas Guogis
    www.kitox.com
     
    Vaidas, May 6, 2004
    #2
  3. John Mayo

    John Mayo Guest

    Thank-you Vaidas, but I need a block that will automatically update. Any
    ideas?

    John

    (strcat (getvar "dwgprefix")(getvar "dwgname")))
     
    John Mayo, May 6, 2004
    #3
  4. if you have express tools, use an RTEXT object with the string:

    $(upper,$(getvar, "dwgprefix")$(substr,$(getvar,
    "dwgname"),1,$(-,$(strlen,$(getvar, "dwgname")),4) ))

    If your drawing is named "F:\dwgs\03333\S102.dwg" it should then display:

    F:\dwgs\03333\S102
     
    Allen Johnson, May 6, 2004
    #4
  5. John Mayo

    John Mayo Guest

    Thanks Allen!

     
    John Mayo, May 6, 2004
    #5
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.