TheSwamp

CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: Keith™ on January 09, 2006, 11:41:35 AM

Title: Civil Design
Post by: Keith™ on January 09, 2006, 11:41:35 AM
Ok .. simple question .. I need to know the name of an arx file that is loaded whenever Civil Design is loaded. I need to be able to tell programmatically if Civil Design is loaded.
Title: Re: Civil Design
Post by: Dinosaur on January 09, 2006, 02:52:38 PM
It is not so simple a question . . . Civil Design menu's may be available, but as far as I can tell, Civil Design is not running until one of its modules is started with a command.
Title: Re: Civil Design
Post by: Chuck Gabriel on January 09, 2006, 03:02:46 PM
Do you know the menugroup name for the Civil Design menu?
Title: Re: Civil Design
Post by: Keith™ on January 09, 2006, 03:06:18 PM
Ok .. let me rephrase then ...

What arx files (modules) load when the user runs a Civil Design command? I don't need them all though, but rather a couple that I can test for to verify if they are loaded. ... and no, I don't know what menugroup it is because I don't use it .. I am merely trying to write a bit of code that relys upon the fact that Civil Design is loaded ...
Title: Re: Civil Design
Post by: Chuck Gabriel on January 09, 2006, 03:08:01 PM
... and no, I don't know what menugroup it is because I don't use it .. I am merely trying to write a bit of code that relys upon the fact that Civil Design is loaded ...

I was asking Dino.  I thought maybe you could test to see if the menu is loaded as an alternative to checking for the presence of the ARX apps.
Title: Re: Civil Design
Post by: Dinosaur on January 09, 2006, 03:13:50 PM
Points, Alignments and Terrain are shared with Land Desktop (not sure if they are identical) Civil Design adds Grading, Layout, Profiles, Cross Sections, Hydrology, Pipeworks and Sheet Manager.

When authorizing the programs, Civil Design does not request any codes until a command from its menu structure is initiated.
Title: Re: Civil Design
Post by: LE on January 09, 2006, 03:14:04 PM
Hi Keith,

Here is something [I do not know if would help]

http://discussion.autodesk.com/thread.jspa?threadID=447357
Title: Re: Civil Design
Post by: Dinosaur on January 09, 2006, 03:32:06 PM
Some that might be what you are looking for include:

AecCivilVol
AecCivilSite
AecCivilHydrology

After further checking, I think AecCivilSite loads up with every module so would be the most likely candidate.
Title: Re: Civil Design
Post by: Jeff_M on January 11, 2006, 01:50:58 PM
Keith, this is what I use:
Code: [Select]
'Original function by John Uhden at Cadlantic.com. Modified By Jeff Mishler _
 for use through LDD6
Public Function CheckForCivilLoaded() As Boolean

Dim applist As Variant, X As Integer, y As Integer, appPath As String

X = 0
applist = Application.ListArx
appPath = ThisDrawing.Application.Path & "\land\"
CheckForCivilLoaded = True

For y = LBound(applist) To UBound(applist)
If applist(y) Like "aeccsite*.arx" Then
X = 1
Exit For
End If
Next

If X = 0 Then
    Dim strSite As String, strVol As String
    strSite = LCase(Dir(appPath & "aeccsite*.arx"))
    strVol = LCase(Dir(appPath & "aeccvol*.arx"))
    If strSite Like "aeccsite*.arx" And _
       strVol Like "aeccvol*.arx" Then
        ThisDrawing.Application.LoadArx appPath & strSite
        ThisDrawing.Application.LoadArx appPath & strVol
    Else
        MsgBox "Civil Design must be installed before using this routine.", vbInformation, "Civil Design Not Found"
        CheckForCivilLoaded = False
    End If
End If

End Function