batch plot method?

Discussion in 'AutoCAD' started by Jason Wilder, May 16, 2004.

  1. Jason Wilder

    Jason Wilder Guest

    I'm looking for advice and suggestions as to whether or not batch plotting
    with VBA is a good idea, or even practical?

    We don't necessarily have large plot jobs, most of our projects are 8-15
    sheets in total. I have an old routine written that will allow the user to
    select files through the (dos_msgbox) - DosLib - and then process the
    returned list through a routine that will build a script file. This works
    great, BUT it requires that the file names and paths not have any spaces in
    them. Unfortunately, a great deal of our folders have spaces, and renaming
    them would be more of a pain because then all the pathed xref's get messed
    up.

    Anyway, I think that gives the picture of my delimma. Now, realizing that
    VBA will process paths w/ spaces in them. I was thinking of using my
    previous routine to create a TXT file rather than a SCR file, and then
    initiate a VBA routine that will process the file against a defined plot
    routine.

    Or are there different methods I could consider in regard to VBA?

    Thanks for any advice.
     
    Jason Wilder, May 16, 2004
    #1
  2. You should be able to handle spaces using lisp. I've done it many times.
    Could you post a sample part of the code that fails?
    Other than that VBA is a good choice for batch processing like plotting.
    For selecting the files you migth want to use GetOpenFileName function in
    comdlg32.dll.

    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, May 17, 2004
    #2
  3. Jason Wilder

    Matt W Guest

    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.
     
    Matt W, May 17, 2004
    #3
  4. Jason Wilder

    Jason Wilder Guest

    Yes, LISP can handle the spaces, but it'd the SCR file that is the issue,
    not the LISP.
     
    Jason Wilder, May 17, 2004
    #4
  5. Jason Wilder

    Jason Wilder Guest

    Um, mind refreshing my memory on how to add a quote - " - to each end of my path name and put that into a script file?


    Can you say "too much caffeine"??? Someone's a little "click-happy" this morning...


    If you put quotes around your file names, you should be able to process them with you batch plotting program.

    I.E. "C:\temp\long file name\first floor steel.dwg"
     
    Jason Wilder, May 17, 2004
    #5
  6. Jimmy Bergmark, May 17, 2004
    #6
  7. Jason Wilder

    Jason Wilder Guest

    Thank you Matt.

    I had tried that, but it still didn't quite take, so I had asked in customization, and suggestion over there was to use (chr 34). Basically same as what you're showing, but I create a variable first.

    But you were right though, I needed the extra quotes, works nice now.

    Thanks!
    Forget the last post...
    It needs to be "\"".
    I'm stuck in the world of VBA.

    Sorry...

    (defun C:ScriptTest ( / scrpt)
    (setq scrpt (open "e:/temp/script.scr" "w"))
    (write-line (strcat "\"" "Long file name" "\"") scrpt)
    (close scrpt)
    (princ)
    )

    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.

    it's been a while but I believe this will work...
    Note the sets of (3) quotes.

    (write-line (strcat """ LongFileName """) script-name)

    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.


    Um, mind refreshing my memory on how to add a quote - " - to each end of my path name and put that into a script file?


    Can you say "too much caffeine"??? Someone's a little "click-happy" this morning...


    If you put quotes around your file names, you should be able to process them with you batch plotting program.

    I.E. "C:\temp\long file name\first floor steel.dwg"
     
    Jason Wilder, May 17, 2004
    #7
  8. Jason Wilder

    Jason Wilder Guest

    True, but I wasn't getting the quotes into the script file. That was the
    part I was missing. :D

    I've gotten the right syntax for my variable now, so I've got the path in
    quotes now like you show.

    Thanks Jimmy.
     
    Jason Wilder, May 17, 2004
    #8
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.