so for this year same as before just open the project and specify a new search folder path for all the com and .net dlls from autodesk then change the application class whatever to 9.0? anything else that maybe tricky like one of the other year if i remember right.
just asking this so to be sure and carry on with upgrading later tonight.
oh, also for 2012 is it possible to ditch all com and move to .net? is it as good as autocad .net exposure now? look forward to that.
still no multicore support i guess. render my new computer quite useless compared to core 2 even. got more than 13pt on cinebench doesn't mean much when comes to civil 3d.
thank you.
Moving to 2012 is pretty much as you describe. If you are using VS2010, I believe you can complie for .NET4.0. If using VS2008 and want to Debug in 2012, there are some things you need to do....I think Kean Walmsley outlined this shortly after the 2012 release.
No, not fully ported to .NET so COM is still needed....but, it is getting better. Especially Surfaces for 2012.
Oh, there was one big issue....not sure if they corrected the SP1 download, but after installing SP1 for C3D2012 the COM references were no longer able to be located. I was sent a REG file to install which fixed this, so if you run into this issue, just let me know and I'll get that REG file to you. (A search back in this forum to around the time the SP was released will give you all the details.)
hey Jeff
i got it upgraded ok but can't debug. says
no symbols are loaded for any call stack frame. the source code cannot be displayed
to investigate further
browse to find source
also still says can't debug in x64. should i set project to x64 not any cpu?
thanks
Bob
Hi,
I'm not Jeff, but I'm here at the moment 😉
If you upgrade your projects to 2012 you should also change the Framework to 4.0, look to Jeff's post 2 of 4 in this thread.
As long as you haven't changed (or did some tricks with acad.exe.config) you have no chance to get it into the debugger to stop at breakpoints.
>> also still says can't debug in x64
Is that the exact message? Or does VS tell you "you can't EDIT in 64bit mode"?
If the message is "you can't edit" than it's a fact of VS2010 and 64bit ... there is no chance to edit-while-debug. Sorry.
- alfred -
No, leave it set at AnyCPU. You should be able to step through using Debug, but you will not be able use Edit and Continue....that is an issue that you'd have to take up with Microsoft, no one can use edit & continue in a 64bit app. (The app in this case is Autocad, not your dll).
hi Alfred
thanks for replying.
this is what i get. but somehow when step out it will to through the command method sub which is a different class file.
i set 4.0 yesterday after seeing that message right away but didn't make any difference. no edit is fine i am used to it already. but somehow on microsoft if you search debug x64 class library they said oh just change the cpu or something then should work. i guess not for autodesk .net stuff.
Read Kean's blog about this....FIBERWORLD that should get you up and running. I'd forgotten about this...
Hi,
>> this is what i get
What I can imagine then (and you look into) is:
Just found: also Kean Walmsley has a blog in this: <<<here>>>
[EDIT] OK, Jeff is the faster one 😉 [/EDIT]
HTH, - alfred -
ok. apparently some old school dude is using windows xp 32bit and said my program doesn't work. got the following messages.
so what it takes to make this work for windows xp 32bit? i was thinking about .net 4.0 not installed but then when you install c3d 2012 it will install all those.
rename .doc to docx if can't see. interesting. using word 2010 but xp 32? lol.
i have set to all cpu.
here are the code that is accessing all the autocad and civil3d com objects.
Imports System Imports AutoCAD = Autodesk.AutoCAD.Interop Imports AeccLandLib = Autodesk.AECC.Interop.Land Imports Autodesk.AECC.Interop.Roadway Imports AecUIBase = Autodesk.AEC.Interop.UIBase Imports Autodesk.AECC.Interop.UiRoadway Imports Autodesk.AutoCAD.Interop Imports Autodesk.AutoCAD Imports Autodesk.AutoCAD.Interop.Common Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices.Marshal Imports Autodesk.AECC.Interop.Land Imports System.Math Imports Autodesk.AECC.Interop.UiLand Imports Autodesk.AutoCAD.ApplicationServices Imports Autodesk.AECC.Interop.Pipe Imports Autodesk.AECC.Interop.UiPipe Module ApplicationC3D Public oAcadApp As AutoCAD.AcadApplication Public WithEvents oAcadDoc As AutoCAD.AcadDocument+ Public oAeccApp As AeccApplication Public oAeccDb As AeccLandLib.AeccDatabase Public oAeccDoc As AeccDocument Public oAeccRoadwayApp As AeccRoadwayApplication Public oAeccRoadwayDb As AeccRoadwayDatabase Public oAeccRoadwayDoc As AeccRoadwayDocument Public oAeccPipeApp As AeccPipeApplication Public oAeccPipeDb As AeccPipeDatabase Public oAeccPipeDoc As AeccPipeDocument Public sAcadProdID As String = "AutoCAD.Application" Public sAeccAppProdID As String = "AeccXUiLand.AeccApplication.9.0" Public sAeccRoadwayAppProdID As String = "AeccXUiRoadway.AeccRoadwayApplication.9.0" Public sAeccPipeAppProdID As String = "AeccXUiPipe.AeccPipeApplication.9.0" 'version 2009 Public Function GetCivilObjects() As Boolean 'Try ' 'get acad Objects ' oAcadApp = GetObject(, sAcadProdID) ' oAcadApp.Visible = True ' oAcadDoc = oAcadApp.ActiveDocument ' 'get land objects ' oAeccApp = CType(oAcadApp.GetInterfaceObject(sAeccAppProdID), AeccApplication) ' oAeccDb = CType(oAeccApp.ActiveDocument.Database, AeccDatabase) ' oAeccDoc = CType(oAeccApp.ActiveDocument, AeccDocument) ' 'get roadway objects ' oAeccRoadwayApp = CType(oAcadApp.GetInterfaceObject(sAeccRoadwayAppProdID), AeccRoadwayApplication) ' oAeccRoadwayDb = CType(oAeccRoadwayApp.ActiveDocument.Database, AeccRoadwayDatabase) ' oAeccRoadwayDoc = CType(oAeccRoadwayApp.ActiveDocument, AeccRoadwayDocument) ' 'get pipe objects ' oAeccPipeApp = CType(oAcadApp.GetInterfaceObject(sAeccPipeAppProdID), AeccPipeApplication) ' oAeccPipeDb = CType(oAeccPipeApp.ActiveDocument.Database, AeccPipeDatabase) ' oAeccPipeDoc = CType(oAeccPipeApp.ActiveDocument, AeccPipeDocument) ' GetCivilObjects = True 'Catch ex As Exception ' GetCivilObjects = False ' 'MsgBox("Error: Civil 3D is Not open.", MsgBoxStyle.Critical) 'End Try Try RunCvl() GetCivilObjects = True Catch ex As Exception GetCivilObjects = False End Try End Function Public Function RunCvl() As Boolean Try Try oAcadApp = Application.AcadApplication oAcadDoc = oAcadApp.ActiveDocument Catch ex As Exception Dim AcadProg As System.Type = System.Type.GetTypeFromProgID("AutoCAD.Application") oAcadApp = System.Activator.CreateInstance(AcadProg, True) End Try 'If oAcadApp IsNot Nothing Then ' oAcadApp.Visible = True ' oAeccApp = New AeccApplicationClass ' oAeccApp.Init(oAcadApp) 'End If Catch ex As Exception MsgBox(ex.ToString) Return False End Try '================ Try oAeccApp = CType(oAcadApp.GetInterfaceObject(sAeccAppProdID), AeccApplication) oAeccDoc = oAeccApp.ActiveDocument oAeccDb = oAeccApp.ActiveDocument.Database 'get roadway objects oAeccRoadwayApp = CType(oAcadApp.GetInterfaceObject(sAeccRoadwayAppProdID), AeccRoadwayApplication) oAeccRoadwayDoc = CType(oAeccRoadwayApp.ActiveDocument, AeccRoadwayDocument) oAeccRoadwayDb = CType(oAeccRoadwayApp.ActiveDocument.Database, AeccRoadwayDatabase) 'get pipe objects oAeccPipeApp = CType(oAcadApp.GetInterfaceObject(sAeccPipeAppProdID), AeccPipeApplication) oAeccPipeDb = CType(oAeccPipeApp.ActiveDocument.Database, AeccPipeDatabase) oAeccPipeDoc = CType(oAeccPipeApp.ActiveDocument, AeccPipeDocument) Catch MsgBox("Civil 3D No doc!") Return False End Try Return True End Function Public Function ReleaseCivilObjects() As Boolean Try ''release roadway objects 'FinalReleaseComObject(oAeccRoadwayDoc) 'FinalReleaseComObject(oAeccRoadwayDb) 'FinalReleaseComObject(oAeccRoadwayApp) ''release Aecc objects 'FinalReleaseComObject(oAeccDoc) 'FinalReleaseComObject(oAeccDb) 'FinalReleaseComObject(oAeccApp) ''release Autocad objects 'FinalReleaseComObject(oAcadDoc) 'FinalReleaseComObject(oAcadApp) 'ReleaseCivilObjects = True oAeccRoadwayDoc = Nothing oAeccRoadwayDb = Nothing oAeccRoadwayApp = Nothing oAeccDoc = Nothing oAeccDb = Nothing oAeccApp = Nothing oAcadDoc = Nothing oAcadApp = Nothing Catch ex As Exception Exit Function End Try End Function Public Sub LoadToolbars() Dim cuiname As String = "C3D_TOOLS" Dim cuifile As String = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\H5M\Civil 3D Tools\C3D Tools.cui" Dim mg As AcadMenuGroup Try 'Attempt to access our menugroup mg = Application.MenuGroups.Item(cuiname) Catch ex As System.Exception 'Failure simply means we need to load the CUI first Application.MenuGroups.Load(cuifile) mg = Application.MenuGroups.Item(cuiname) End Try 'Cycle through the toobars, setting them to visible Dim i As Integer For i = 0 To mg.Toolbars.Count - 1 mg.Toolbars.Item(i).Visible = True Next End Sub End Module