How feasible VBA is this to create? Looking for guidance..

Discussion in 'AutoCAD' started by Dan, Sep 8, 2004.

  1. Dan

    Dan Guest

    I wish to do the following:
    Open New Drawing (acad.dwt)
    (Prompt user to select drawing files to work with, create a list I guess)
    (Prompt User to select a lisp routine to run on the files)
    Insert 1st drawing file at 0,0
    (Prompt User to select a lisp routine to run on the file)
    run lisp
    Save File AS (Filename that was inserted)
    Close
    Repeat for next drawing file in list.


    I wanted some input as to maybe the best approach before I get started.
    I am stil very new to AutoCAD VBA. The file browsing and selection of
    individual files elude me so far. I have come across some example code for
    selecting an entire directory, but not individual files.

    Is this very difficult to code?

    Thank you for any input. I am looking for any suggestions/links/code/help
    file resources

    Dan
     
    Dan, Sep 8, 2004
    #1
  2. Dan,

    Have you heard of ObjectDBX? It allows you to manipulate drawings without
    loading them fully in the drawing editor. It makes many types of batch
    processing very fast, as there are no graphic updates to perform. You can
    search this ng for many examples of using ObjectDBX, or ask further
    questions in this thread.

    --
    R. Robert Bell


    I wish to do the following:
    Open New Drawing (acad.dwt)
    (Prompt user to select drawing files to work with, create a list I guess)
    (Prompt User to select a lisp routine to run on the files)
    Insert 1st drawing file at 0,0
    (Prompt User to select a lisp routine to run on the file)
    run lisp
    Save File AS (Filename that was inserted)
    Close
    Repeat for next drawing file in list.


    I wanted some input as to maybe the best approach before I get started.
    I am stil very new to AutoCAD VBA. The file browsing and selection of
    individual files elude me so far. I have come across some example code for
    selecting an entire directory, but not individual files.

    Is this very difficult to code?

    Thank you for any input. I am looking for any suggestions/links/code/help
    file resources

    Dan
     
    R. Robert Bell, Sep 8, 2004
    #2
  3. Dan

    Matt W Guest

    I'm just being lazy here, Robert (don't really feel like "surfing" right
    now), but is there a way to save the DWG thumbnail when running ObjectDBX?

    --
    Matt W

    I love deadlines
    I like the whooshing sound they make as they fly by.

    | Dan,
    |
    | Have you heard of ObjectDBX? It allows you to manipulate drawings without
    | loading them fully in the drawing editor. It makes many types of batch
    | processing very fast, as there are no graphic updates to perform. You can
    | search this ng for many examples of using ObjectDBX, or ask further
    | questions in this thread.
    |
    | --
    | R. Robert Bell
    |
    |
    | | I wish to do the following:
    | Open New Drawing (acad.dwt)
    | (Prompt user to select drawing files to work with, create a list I guess)
    | (Prompt User to select a lisp routine to run on the files)
    | Insert 1st drawing file at 0,0
    | (Prompt User to select a lisp routine to run on the file)
    | run lisp
    | Save File AS (Filename that was inserted)
    | Close
    | Repeat for next drawing file in list.
    |
    |
    | I wanted some input as to maybe the best approach before I get started.
    | I am stil very new to AutoCAD VBA. The file browsing and selection of
    | individual files elude me so far. I have come across some example code for
    | selecting an entire directory, but not individual files.
    |
    | Is this very difficult to code?
    |
    | Thank you for any input. I am looking for any suggestions/links/code/help
    | file resources
    |
    | Dan
    |
    |
    |
     
    Matt W, Sep 8, 2004
    #3
  4. Dan

    Ed Jobe Guest

    Since you already have the lisp and aren't ready to convert them to vba, I
    would recommend ScriptPro. It takes care of handling the file iteration. You
    just need to get the lisp into script form.
     
    Ed Jobe, Sep 8, 2004
    #4
  5. Dan

    Matt W Guest

    Ummm... nice colors?!?

    --
    Matt W

    I love deadlines
    I like the whooshing sound they make as they fly by.

    | Dan
    |
    | I have attached dvb file we sometimes use to batch process multiple dwg
    | files.
    | I don't know if this does exactly you want, but it will allow you to
    select
    | multiple dwg files and then a lisp routine to run on all of them. Maybe
    it
    | could be used as a starting point. The lisp routine you select should not
    | allow any user prompts.
    |
    | This dvb can be modified to allow you to batch process files in various
    | ways: lisp, VBA or ObjectDBX. btw, some of the code was lifted from this
    | NG.
    |
    | Chris
    |
    |
    | | > I wish to do the following:
    | > Open New Drawing (acad.dwt)
    | > (Prompt user to select drawing files to work with, create a list I
    guess)
    | > (Prompt User to select a lisp routine to run on the files)
    | > Insert 1st drawing file at 0,0
    | > (Prompt User to select a lisp routine to run on the file)
    | > run lisp
    | > Save File AS (Filename that was inserted)
    | > Close
    | > Repeat for next drawing file in list.
    | >
    | >
    | > I wanted some input as to maybe the best approach before I get started.
    | > I am stil very new to AutoCAD VBA. The file browsing and selection of
    | > individual files elude me so far. I have come across some example code
    for
    | > selecting an entire directory, but not individual files.
    | >
    | > Is this very difficult to code?
    | >
    | > Thank you for any input. I am looking for any
    suggestions/links/code/help
    | > file resources
    | >
    | > Dan
    | >
    | >
    |
    |
    |
     
    Matt W, Sep 8, 2004
    #5
  6. Dan

    Dan Guest

    Thanks Everyone,
    I will look at the code Chris, Thanks. ObjectDBX does seem like a good way
    to go. Something new to learn, Awesome.
    I will keep plugging away.

    Dan
     
    Dan, Sep 8, 2004
    #6
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.