Results 1 to 2 of 2

Thread: Using VB6 to start Acad with profile

  1. #1
    Join Date
    Login to Give a bone

    Unhappy Using VB6 to start Acad with profile

    I have been trying to start acad(v15) with VB6 using a certain profile. I can get it to open, it hangs.

    The code I have is :

    Public Sub get_autocad()
        Dim strProfileName As String
        Dim acadApp As AutoCAD.AcadApplication
        Dim thisdrawing As AutoCAD.AcadDocument
        strProfileName = Left$(sArgName, (Len(sArgName) - 4))
        Set acadApp = CreateObject("autocad.application.15")
        Set acadApp = GetObject(, "AutoCAD.Application.15")
        Set thisdrawing = acadApp.ActiveDocument
        acadApp.Preferences.Profiles.ActiveProfile = strProfileName
    End Sub
    Acad starts and runs and then hangs with the command line displaying:

    Menu loaded successfully. MENUGROUP: ACAD

    I have to click in the active window, hit esc or something to get the initialization to finish.

    Anyone have any ideas?


    Sorry for the *edit* but code reads much better when the "Code" button is used.
    For further details please refer to "Reading and Posting Messages" on the FAQs Page.

    Forum Moderator
    Last edited by Opie; 2006-03-21 at 06:08 AM. Reason: [code] tags added. See Moderator comment.

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    Seattle WA USA
    Login to Give a bone

    Default Re: Using VB6 to start Acad with profile

    AutoCAD is likely not finished loading the original profile when you attempt to change the profile. You might be able to use the GetAcadState method to determine if AutoCAD is ready.

Similar Threads

  1. Start AutoCAD or ACA without profile
    By Androw in forum Productstream - General
    Replies: 0
    Last Post: 2012-04-18, 01:22 PM
  2. ACAD will not start
    By dtosh in forum AutoCAD General
    Replies: 3
    Last Post: 2010-03-26, 06:30 PM
  3. ACAD 2008 Start's Up in a Command
    By KENM.185781 in forum AutoCAD General
    Replies: 2
    Last Post: 2008-06-23, 08:29 PM
  4. ACAD 2009 - Where to start?
    By SteveChestnut in forum CAD Management - General
    Replies: 13
    Last Post: 2008-05-18, 04:44 PM
  5. Start AutoCAD with a certain profile?
    By CadDog in forum AutoCAD General
    Replies: 3
    Last Post: 2006-03-21, 04:51 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