Live Attributes

Discussion in 'AutoCAD' started by thenov, Oct 9, 2004.

  1. thenov

    thenov Guest

    I have a block with an attribute tag that I want to automatically populate with the CURRENT drawing name. I can initially do this. However if the user renames the file or does a saves the original drawing name shows up. I have tired to use a DIESEL expression but that will not work inside an attribute. I am using AutoCAD 2004. I know about the fields in AutoCAD 2005 but this application must be done in AutoCAD 2004. Do I need a reactor for this? Is there an easier way? Please let me know.
     
    thenov, Oct 9, 2004
    #1
  2. thenov

    ECCAD Guest

    I suggest a quick lisp function that checks the system variable "dwgname". If the value in the attribute is not = to the value in "dwgname", then replace the attribute value. Do this function in your .mnl or other 'startup' routine. Load the lisp, and call the function. (e.g.) (load "update_filename")(update_file). Where function 'update_file' is in the lisp 'update_filename.lsp'. This way, each time the drawing is opened, it will be updated. If you need help with the lisp, just ask.

    Bob
     
    ECCAD, Oct 9, 2004
    #2
  3. thenov

    thenov Guest

    Thanks! I will explore this option.
     
    thenov, Oct 10, 2004
    #3
  4. thenov

    SpeedCAD Guest

    SpeedCAD, Oct 10, 2004
    #4
  5. thenov

    thenov Guest

    Thanks! I wrote an event in VBA. This is the same as a reactor in VLISP. Actually it was pretty easy in VBA.
     
    thenov, Oct 11, 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.