Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: VBA and Startup Suite

  1. #1
    100 Club
    Join Date
    2001-10
    Posts
    138
    Login to Give a bone
    0

    Default VBA and Startup Suite

    I am trying to find out how to populate a startup suite with VBA. Any Ideas?

    The purpose of this is to add to a slew of VBA steps that will automatically setup Autocad w/ correct support paths, menus, pc3 path, palette, etc.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    Create a new project and save it as acad.dvb. In a public module, create a public sub called AcadStartup. Add you setup to this method and it will run at startup. An alternate method would be to use profiles. Create a profile with the correct settings in Options. Change the shorcut used to start acad by adding the /p startup switch followed by the profile name in double quotes. The name is case sensitive. You can save the profile to an arg file and share it with other users.
    C:> ED WORKING....


    LinkedIn

  3. #3
    100 Club
    Join Date
    2001-10
    Posts
    138
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    That's cool that you can edit the shortcut to activate.

    I've done sort of what you're saying w/ the acad.dvb. The issue though is that I need to place a few .lsp files in the Startup Suite in the APPLOAD dialogue. Is there a way in VBA to populate that startup suite?

    Marc

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    You shouldn't need to use the startup suite. Use acad.lsp for running the lisp files at startup. If you make a partial menu for your custom code, you can also use your menu's mnl file to load lisp and your other dvb's.
    C:> ED WORKING....


    LinkedIn

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,100
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    Quote Originally Posted by mboyer
    That's cool that you can edit the shortcut to activate.

    I've done sort of what you're saying w/ the acad.dvb. The issue though is that I need to place a few .lsp files in the Startup Suite in the APPLOAD dialogue. Is there a way in VBA to populate that startup suite?

    Marc
    Depending on your needs, you could use the ACAD.LSP or ACADDOC.LSP files. These are user created files. These files will be executed by AutoCAD upon start up or opening a drawing.

    If you have more than one each of these two files, the first ones found will be the ones that are loaded.

    They do not add anything to the Startup Suite, as far as I know.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    100 Club
    Join Date
    2001-10
    Posts
    138
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    I am familiar w/ the acaddoc.lsp. That makes sense. If I add the lsp info into this file, it will be loaded automatically just like the startup suite would do.

  7. #7
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    acaddoc is simiar to acad.lsp, except that it runs everytime you open a file. acad.lsp only runs once when the app is first started, just like the startup suite would do. This is the one you want for doing setup work.
    C:> ED WORKING....


    LinkedIn

  8. #8
    100 Club
    Join Date
    2001-10
    Posts
    138
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    Let me ask you this then. I had setup a bunch of variable settings to occur through vba. In the ACADDOC.lsp, a routine automatically ran the macro.

    I ran into issues when people were batch plotting to dwf and it only occured when I had this set up. If I placed the same routine in the ACAD.lsp, would that eliminate the plotting issue since it would only run at startup?

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    You didn't say what "issues", but I would say, "yes". Give it a try.
    C:> ED WORKING....


    LinkedIn

  10. #10
    100 Club
    Join Date
    2001-10
    Posts
    138
    Login to Give a bone
    0

    Default Re: VBA and Startup Suite

    Here's one of the major issues I was having.
    When doing a batch plot of several files using the Publish command, we'd get an error message at about the 3rd file the batch came across. At first I thought maybe it was the file, but after checking it throughly, I found nothing wrong w/ it. When I removed the program in the Acaddoc.lsp, the error went away.

Page 1 of 2 12 LastLast

Similar Threads

  1. Startup Suite
    By Borgster in forum AutoLISP
    Replies: 2
    Last Post: 2014-04-24, 04:31 PM
  2. STARTUP SUITE PROBLEMS
    By jayhay35365091 in forum AutoLISP
    Replies: 10
    Last Post: 2014-03-03, 04:13 PM
  3. Startup Suite Not Working
    By jchavez76 in forum AutoCAD Customization
    Replies: 4
    Last Post: 2010-10-08, 12:09 PM
  4. Startup Suite
    By dmarcotte4 in forum API Wish List
    Replies: 0
    Last Post: 2006-11-02, 04:19 AM
  5. Startup Suite and Profiles
    By mjsregister in forum VBA/COM Interop
    Replies: 2
    Last Post: 2004-06-28, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •