RE: VAB routine working in Civil 3D 2007, but not in Civil 3D 2008
did you solve this? I am having trouble converting my 2007 vba routines to 2008 also.
The architectural department isnt having this trouble. just civil 3d users.
I get a compile error: Error in loading DLL.
this happen when it hits the line sCurUser = Environ("username")
here is a sample of the code.
any input from anyone would be appreciated.
Code:
Sub Civil3d2008Setup()
Dim sCurUser As String
Dim acadPref As AcadPreferences
sCurUser = Environ("username")
Set acadPref = ThisDrawing.Application.Preferences
acadPref.Files.SupportPath = "C:\Documents and Settings\" & sCurUser & "\Application Data\Autodesk\C3D 2008\enu\support;c:\Program Files\AutoCAD Civil 3D 2008\support;c:\Program Files\AutoCAD Civil 3D 2008\fonts;c:\Program Files\AutoCAD Civil 3D 2008\support;c:\Program Files\AutoCAD Civil 3D 2008\help;c:\Program Files\AutoCAD Civil 3D 2008\express;c:\Program Files\AutoCAD Civil 3D 2008\support\color;C:Program Files\AutoCAD Civil 3D 2008\Civil;C:\Program Files\AutoCAD Civil 3D 2008\Getting Started Guide;c:\Program Files\AutoCAD Civil 3D 2008\FDO\bin;c:\Program Files\Common Files\Autodesk Shared\AxUi;c:\CADD Standards\Fonts"
acadPref.Files.PrinterConfigPath = "G:\CADD Standards\plotters"
acadPref.Files.PrinterStyleSheetPath = "G:\CADD Standards\Plot Styles\Civil"
acadPref.Files.AutoSavePath = "c:\Temp"
acadPref.Files.TemplateDwgPath = "G:\CADD Standards\Templates\Civil\"
acadPref.Files.QNewTemplateFile = "G:\CADD Standards\Templates\Civil\LSC_Civil3D.dwt"
acadPref.Files.TempFilePath = "c:\Temp"
acadPref.Files.TempXrefPath = "c:\Temp"
Unload Me
UserForm2.Show
End Sub
RE: VAB routine working in Civil 3D 2007, but not in Civil 3D 2008
Yes I actually did figure it out. But it is not because the routine was bad. Its because In 2008 the checkbox to use name templates was checked by default (i believe). This should not be checked, in order for the routine I have to work. If that makes sense.
As far as your question goes, I am not really sure what is happening there. Unless for some reason it doesnt like what your passing into the Environ method.
RE: VAB routine working in Civil 3D 2007, but not in Civil 3D 2008
cool, glad you got your problem fixed..
thanks for the update.
i re-created my deplyment to install with these paths, so then i didn't need the routine.