Inserting drawing No.'s from ASCII file

Discussion in 'AutoCAD' started by jspayne, Aug 12, 2003.

  1. jspayne

    jspayne Guest

    Please forgive my ignorance. I need to move a piece of text in a title block to a new location and put new text in its place. The new text needs to be read from a ASCII text file. This needs to be done to about 2000 drawings. I was thinking that I could have a program to open each drawing in a directory, move the required text, get a value from the first line in a text file and place it in the title block, then move to the next drawing and the next line in the ASCII file. I’m not a programmer as you might have guessed but I made some small lisp routines. I can handle moving the text but pulling a value from a ASCII file then opening the next drawing in a directory and moving to the next line in the text file I need help with. Heeeelp please!
     
    jspayne, Aug 12, 2003
    #1
  2. jspayne

    Mark Propst Guest

    if your text file has exactly the same number of lines as there are drawings
    to process in your list, then you could do something like this
    write your lisp to move the text, open the text file(open), read the first
    line(read-line), insert the text, then delete the first line of the text
    file and save it(close)

    then write a script to load and call the lisp

    then use script pro to apply the script to the selected drawings

    hth
    Mark
    block to a new location and put new text in its place. The new text needs to
    be read from a ASCII text file. This needs to be done to about 2000
    drawings. I was thinking that I could have a program to open each drawing in
    a directory, move the required text, get a value from the first line in a
    text file and place it in the title block, then move to the next drawing and
    the next line in the ASCII file. I'm not a programmer as you might have
    guessed but I made some small lisp routines. I can handle moving the text
    but pulling a value from a ASCII file then opening the next drawing in a
    directory and moving to the next line in the text file I need help with.
    Heeeelp please!
     
    Mark Propst, Aug 12, 2003
    #2
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.