.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.net migration to 2014 issue

24 REPLIES 24
Reply
Message 1 of 25
jorgemontalvo
936 Views, 24 Replies

.net migration to 2014 issue

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

Tags (1)
24 REPLIES 24
Message 21 of 25

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 22 of 25

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.

 

Spoiler
2 ref.JPG

 

And 19 errors

Spoiler
Errors.JPG

 

9 warnings

Spoiler
Warnings.JPG

 

Then I added these two references.

Spoiler
Ref.JPG

 

And to compile comment out these errors.

Spoiler
Error.JPG

 

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.

Spoiler
odbc.JPG

 

Clicking on 'Continue' shows the splash screen (I could'nt get a snapshot of that)

And the login form.

 

Spoiler
Login.JPG

 

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.

 

Message 23 of 25

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

Message 24 of 25
Balaji_Ram
in reply to: jorgemontalvo

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

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 25 of 25
jorgemontalvo
in reply to: Balaji_Ram

The problem persist in the interop.ADODB reference. How can I fix this error well it  changed from 2012 to 2014??????

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost