Hi!
Sorry for my English.
I have a program in VB2010 (AutoCAD2012) to VB2012 (AutoCAD2015)
taken. Unfortunately, when I start it now (netload), nothing happens.
Admit it still features the in VB2012 (AutoCAD2015) must be observed?
Thank you for your help.
Imports System Imports System.IO Imports System.Drawing Imports System.Windows.Forms Imports System.Windows Imports Autodesk.AutoCAD.Runtime.RuntimeSystem Imports Autodesk.AutoCAD.ApplicationServices Imports Autodesk.AutoCAD.ApplicationServices.Application Imports Autodesk.AutoCAD.DatabaseServices Imports Autodesk.AutoCAD.Geometry Imports Autodesk.AutoCAD.Colors Imports Autodesk.AutoCAD.EditorInput Imports Autodesk.AutoCAD.GraphicsSystem.View Imports Autodesk.AutoCAD.Windows Imports Autodesk.AutoCAD.Runtime <Assembly: CommandClass(GetType(LB_System_Standrohr.MyCommands))> Namespace LB_System_Standrohr Public Class MyCommands <CommandMethod("LB_Standrohr")> Public Sub FormLoad1() Dim myDoc As Document = DocumentManager.MdiActiveDocument Dim myDB As Database = myDoc.Database Using myTrans As Transaction = myDB.TransactionManager.StartTransaction Try '--Linientyp laden "VERDECKT" und "STRICHPUNKT" Dim myLineTypTable As LinetypeTable myLineTypTable = myTrans.GetObject(myDB.LinetypeTableId, OpenMode.ForRead) Dim myVERDECKT As String = "VERDECKT" If myLineTypTable.Has(myVERDECKT) = False Then myDB.LoadLineTypeFile(myVERDECKT, "acad.lin") End If Dim mySTRICHPUNKT As String = "STRICHPUNKT" If myLineTypTable.Has(mySTRICHPUNKT) = False Then myDB.LoadLineTypeFile(mySTRICHPUNKT, "acad.lin") End If '--Form laden bzw. aufrufen Dim FormObj1 As LB_System = New LB_System FormObj1.StartPosition = Forms.FormStartPosition.CenterScreen FormObj1.ShowDialog() End Sub End Class End Namespace
Solved! Go to Solution.
Solved by dirkborowski29. Go to Solution.
It seems to be a porting problem, check all of the base things:
- AutoCAD 2015 is not binary compatible with previous versions, you have to recompile using NET framework 4.5.0 or 4.5.1 (see application properties)
- you must reference dll from ObjectARX 2015 (AcMgd, AcDbMgd, ecc.). Check reference folders also in project properties.
Hi!
The program was originally created with VB2010 under AutoCAD 2012.
Now I have opened the program in VB2012 and changed the following:
References from the
- AcCoreMgd, AcDbMgd, AcMgd from the directory C: \ ObjectARX 2015
- Local copy set to False
-. Net Framework 4.5
VB2012 does not show any errors.
At startup / debug but not AutoCAD 2015 special launched in 2012 AutoCAD.
Why might that be?
Is there a solution for this problem?
Thanks in advance.
Hi,
I see some problems:
1.- A missing space + underscore after the command attribute
2.-The call to the form LB_System shoud be :Application.ShowModalDialog(FormObj1)
3.- Not sure if the positioning of the form will work, I usually set the form positioning in the form itself.
Gaston Nunez
Hello!
I have my problem to solve now.
It was up to the ... vbproj.user file.
Here I have adapted these directories and now it works.
- <ReferencePath> C: \ ObjectARX 2015 \ inc </ ReferencePath>
- <StartProgram> C: \ Program Files \ Autodesk \ AutoCAD 2015 \ acad.exe </ Start Program>
Thanks again for the suggestions.
greeting
Dirk