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 :
Code:
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?
Thanks,
Joe
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.
Richard
Forum Moderator