See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: Identifying Autocad Architecture/MEP

  1. #1
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Question Identifying Autocad Architecture/MEP

    Hi all,

    Is there a way to tell my VBA script whether it is being run by Autocad Architecture or Autocad MEP (ABS)? The ACADVER variable in both apps reports the same thing (17.1s (LMS Tech)) and is retrieved simply with Application.Version, but this seems to be just the Autocad version number. Is there something that would report whether it's Architecture or MEP? Thanks!

  2. #2
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    0

    Default Re: Identifying Autocad Architecture/MEP

    Quote Originally Posted by dbaldacchino View Post
    Hi all,

    Is there a way to tell my VBA script whether it is being run by Autocad Architecture or Autocad MEP (ABS)? The ACADVER variable in both apps reports the same thing (17.1s (LMS Tech)) and is retrieved simply with Application.Version, but this seems to be just the Autocad version number. Is there something that would report whether it's Architecture or MEP? Thanks!
    How about system variable PRODUCT ? If that doesn't help, try sysvar PROGRAM. Sorry that I don't have any verticals here to test that.

  3. #3
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Default Re: Identifying Autocad Architecture/MEP

    Thanks for the tip, unfortunately they're useless. PROGRAM results in "acad" and PRODUCT results in "AutoCAD". I just can't believe there's not a simple way!

  4. #4
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    1

    Default Re: Identifying Autocad Architecture/MEP

    Quote Originally Posted by dbaldacchino View Post
    Thanks for the tip, unfortunately they're useless. PROGRAM results in "acad" and PRODUCT results in "AutoCAD". I just can't believe there's not a simple way!
    Presuming that both applications have different titles, you could use Application.Caption to distinguish between them.

  5. #5
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Default Re: Identifying Autocad Architecture/MEP

    Ahhh that's it. I didn't realize there was a caption property. Now I can look for the word "Architecture" and if it's not there, it means MEP is running. Thanks a lot!

  6. #6
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Identifying Autocad Architecture/MEP

    You might also want to check for which ARX files have been loaded.

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

    Default Re: Identifying Autocad Architecture/MEP

    You can also use these functions. GetRegAppBase can be modified to return whatever you need to determine which app is running.

    Code:
    Public Function GetAppPath() As String
        'returns path of acad.exe for current desktop app
        'you may need to append a backslash when concatenating text
        Dim strPath As String
        strPath = ThisDrawing.Application.Path
        GetAppPath = strPath
        
    End Function
    
    
    
    Public Function GetAppRegBase() As String
        Dim str As String
        str = GetAppPath
        Select Case str
            Case Is = "C:\Program Files\Autodesk Map 3D 2005"
                GetAppRegBase = "Software\Autodesk\AutoCAD\R16.1\ACAD-302:409\"
            Case Is = "C:\Program Files\Autodesk Building Systems 2007"
                GetAppRegBase = "Software\Autodesk\AutoCAD\R17.0\ACAD-5006:409\"
            Case Else
                GetAppRegBase = ""
        End Select
            
    End Function
    Last edited by Ed Jobe; 2007-09-04 at 07:45 PM.
    C:> ED WORKING....


    LinkedIn

  8. #8
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Default Re: Identifying Autocad Architecture/MEP

    Thanks Ed, that will work too. I was trying to find a solution without having to rely on the installation path just in case I come across a machine with a different configuration.

Similar Threads

  1. Replies: 0
    Last Post: 2015-08-07, 03:47 PM
  2. AB104-2: Autodesk® Revit® Architecture for AutoCAD® Architecture Geeks
    By Autodesk University in forum Architecture and Building Design
    Replies: 0
    Last Post: 2014-11-30, 01:07 PM
  3. Identifying Firewall Ports used by AutoCAD
    By scott.gensemer231955 in forum Networks
    Replies: 1
    Last Post: 2012-02-24, 09:20 PM
  4. Replies: 12
    Last Post: 2012-01-09, 04:43 AM
  5. Package Autocad Architecture with Revit Architecture
    By brian.114831 in forum Revit - Platform
    Replies: 3
    Last Post: 2007-11-14, 04:16 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
  •