Possible String Buffer Overrun on VBASTMT calls

Discussion in 'AutoCAD' started by Terry W. Dotson, Apr 1, 2005.

  1. If you use VBASTMT to open files in a line like this ...

    (command "vbastmt" (strcat "AutoCAD.Documents.Open " (chr 34)
    filnam (chr 34)))

    .... it can fail when the path\filename string is over 100 characters. A
    workaround is to put the path\filename in a user variable and pick it
    back up like ...

    (setvar "USERS5" filnam)
    (command "vbastmt" (strcat "AutoCAD.Documents.Open
    ThisDrawing.GetVariable(" (chr 34) "USERS5" (chr 34) ")"))

    Just thought some might like to know.

    Terry
     
    Terry W. Dotson, Apr 1, 2005
    #1
  2. Terry,

    Is this version specific?
     
    Jason Piercey, Apr 1, 2005
    #2
  3. Jimmy Bergmark, Apr 1, 2005
    #3
  4. I don't know, but since I have to work on 2000 or higher, it had to be
    done for the lowest platform.

    Terry
     
    Terry W. Dotson, Apr 1, 2005
    #4
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.