View Full Version : AutoCAD Electrical

2004-07-02, 07:52 PM
I was wondering how i could have my VB program open AutoCAD Electrical 2005 instead of AutoCAD 2005? I normally just use the code below when i link to autocad. Thanks

On Error Resume Next
Set acdApp = GetObject(, "autocad.application")
If Err.Number <> 0 Then
Set acdApp = CreateObject("autocad.application")
End If
acdApp.Visible = True

Ed Jobe
2004-07-02, 10:02 PM
When you start Electrical from an icon, what controls how it opens? A profile and an arx or two. The code you have will first grab the first instance it finds. If there is none, it will create one, which uses the last profile that was used. Just take that object and load the necessary arx and apply a profile.