I'm having problems to update this working code with visual basic .net and autocad 2012 to autocad 2014. In this version it doesnt recognize the command when I call it from the command window, but in the visual basic it compiles normally. I've followed the instructions to migrate from 2012 to 2014, but cant get this part of the code to work. PLEASE HELP!!
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Public Class Commands
Dim frLog As Login
Dim frInicial As frmInic
'Dim WithEvents Timer As System.Timers.Timer
Dim cont As Integer
' Define command 'Asdkcmd1'
<CommandMethod("carpro")> _
Public Sub carpro()
Dim elTime As Double
Dim elap As Double
elTime = Timer()
elap = Timer()
Dim frPres As Presentacion = New Presentacion
frPres.Show()
While elap < elTime + 2
elap = Timer()
End While
frPres.Close()
frLog = New Login
frLog.Init(Me)
frLog.Show()
'General.PruebaPlot()
'MsgBox("impreso")
'General.WindowPlot()
End Sub
Public Sub Inic(ByVal idUsu As Integer)
frLog.Close()
frInicial = New frmInic(idUsu, Me)
MostrarInic()
End Sub
'Private Sub Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer.Elapsed
' Debug.Print("Suceso: " & cont)
' cont += 1
'End Sub
Public Sub MostrarInic()
frInicial.Show()
End Sub
End Class
Hi,
>> Where do you see the reference missing?
I looked with ILSPY into your DLL (to see if it's save to load for me), and there the acmgd.dll is missed in the list of references.
When you "built" your project, you should look to the output of Visual Studio, may be there are some messages pointing you to the source of the problem.
- alfred -
Hi,
[Edit: Images.zip attached, if the below images are not clear]
I tried with the code which you send in PM.
Here is the result.
When I open the VS project 2 references were missing the path.
And 19 errors
9 warnings
Then I added these two references.
And to compile comment out these errors.
Then compiled the project and netload the routine in Civil3d 2014 64 bit.
DLL loaded to acad successfully.
when run the command CARPRO, got this ODBC error.
Clicking on 'Continue' shows the splash screen (I could'nt get a snapshot of that)
And the login form.
Like Alfred said, it could be a problem with the database driver.
As suggested try with a simple project to check whether autocad needs to be repaired.
Hi ajilal, thank you very much for your reply,
I have a question about the errors you comment out in order to compile. They all correspond to the database link management, that in my 2012 worked fine, but in the 2014 have changed, do you know where can I read more about this problem in order to solve this.
Thanks,
Jorge
Hi Jorge,
Is it possible for you to share a non-confidential sample project that works ok in AutoCAD 2012 64 bit and fails in AutoCAD 2014 64 bit ?
I have AutoCAD 2012 and AutoCAD 2014 installed in my 64 bit system and can try it.
Can you try establishing only the database connection in a simpler test project ? Does that work in AutoCAD 2014 64 bit ?
Regards,
Balaji
The problem persist in the interop.ADODB reference. How can I fix this error well it changed from 2012 to 2014??????