TheSwamp
CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started 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.
-
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.
-
Do you know the menugroup name for the Civil Design menu?
-
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 ...
-
... 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.
-
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.
-
Hi Keith,
Here is something [I do not know if would help]
http://discussion.autodesk.com/thread.jspa?threadID=447357
-
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.
-
Keith, this is what I use:
'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