I using following Code to create a property "ThisDrawing". I want to use this to run customised program.
Public Class Class1
Public ReadOnly Property ThisDrawing As AcadDocument
I am getting error message as "acaddocument' is not a member of Autodesk.AutoCAD.ApplicationServices.Document".
Can any one help me to solve this problem.
Thanks a lot for answering.
When I type GetAcadDocument it is still not identified.
The code I mentioned below works fine with AutoCad 2011.
For AutoCad 2013 I wrote this code and it worked fine
Public Sub DrawL()
Dim acdoc As Document = Application.DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acdoc.Database
Dim PT1 As Point3d = New Point3d(0, 0, 0)
Dim PT2 As Point3d = New Point3d(PT1.X, _
PT1.Y + 10, _
Dim PT1 As DBPoint = New DBPoint(New Point3d(0, 0, 0))
Dim PT2 As DBPoint = New DBPoint(New Point3d(PT1.Position.X, _
PT1.Position.Y + 10, _
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
Dim acBlkTbl As BlockTable = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)
Dim acBlkTblRec As BlockTableRecord = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelS
Dim acLine As Line = New Line(PT1, PT2)
I understand that there are lot of changes in API for AutoCAD 2013. Is it so.
This code you mention it's not using COM, only .NET API, therefore there is no need for GetAcadDocument....
Start with some of our most frequented solutions to get help installing your software.