I have many many tools for AutoCAD/Civil. I know there are performance problems between 2010 and earlier and the 2011+ versions because of the 32/64 bit AutoCAD versions. No problem, performance was good enough.
Just installed Civil2015, but the tools are 10times slower than before (we clocked the same procedure in both CAD-versions). Any idea why?
I installed the VBA enabler just to be certain, but it had no effect.
Peter
Hi,
you created 64bit DLL's with VB6? AFAIK that does not work, so the first/important question is: how did you get anything from VB6 interacting with Civil 3D 64bit.
And what is slow? Can you show code that is slower than before?
- alfred -
No, there are no dll's created. I compile it to an executable (.exe).
VB6 is 32bit. Until version Civil2014 this worked fast enough (although I can see that in Civil2010 32bit the code acts faster), now in Civil2015 it is that slow, I'm currently advising not to update to this newer version.
In the code I use the GetObject function to get a COM-access with AutoCAD (there are no hard references, because we use version Acad2000 until the newest.)
Public AcadApp As Object 'The AutoCAD application object Public AcadDoc As Object 'The AutoCAD document (drawing) object Public AcadMod As Object 'The model space object collection 'v(i) is an array of Acad-versions v(26) = "18.2" 'Acad2012 v(27) = "19" 'Acad2013 v(28) = "19.1" 'Acad2014 v(29) = "20" 'Acad2015 Set AcadApp = GetObject(, "AutoCad.Application." & v(i)) Set AcadDoc = AcadApp.ActiveDocument Set AcadMod = AcadDoc.ModelSpace
For instance getting all the layernames in a Acad-document into an array takes much longer.
Public Function Check_Layer(ByVal LayerName As String) 'Check if Layer exists. If not: create Dim i As Integer, Index As Integer Dim L As String If LayerName = "" Then Exit Function Index = -1 For i = 0 To AcadDoc.Layers.Count - 1 L = LCase(AcadDoc.Layers(i).Name) If L = LCase(LayerName) Then Index = i Exit For End If Next i If Index = -1 Then AcadDoc.Layers.Add (LayerName) End If End Function
I make routines that place Text-objects in the drawing that takes up 10times more time than before.
Public Function Draw_TextC(ByVal Coords3D, TextHeight as Double) as Object Dim oText As Object Dim c(0 To 2) As Double Dim i As Integer
'Coords3D is an array of variants. It HAS to be Double For i = 0 To 2 c(i) = Coords3D(i) Next i Set oText= AcadMod.AddText(Text, c, TextHeight) Set Draw_TextC = oText End Function
When put the upper draw-routine in a for-next it runs very very slow.
Hi,
>> o, there are no dll's created. I compile it to an executable (.exe).
Well, with VB6-EXE you are running out of process anyway and that is more bad with 32bit==>64bit compared to 32bit==>32bit.
I guess it's time to leave VB6 and change to Visual Studio (VB.NET).
- alfred -
This is an old posting, but anyone found a solution to this ?
I am experiencing the same problem (slow and jerky) with vb6 exe application runing in civil 3D 2015.
Let me know if there is a solution of any kind.
Andrew,