I am trying to get my C # .NET Plugin to draw a table in AutoCAD with .NET-based information that users fill out. The code I use for this is based on this page . By changing it for my plan, the code looks like this:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; using Autodesk.AutoCAD.Runtime; namespace WindowsDoors.NET { class OpeningDataTable : Table { private int rowCount = 0; private static Document doc = Application.DocumentManager.MdiActiveDocument;
This problem occurs at the bottom of this line.
(BlockTableRecord)tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
It says that BlockTableRecord does not have a ModelSpace extension, although I accepted this right in the example below. I need to know if there is a way to fix this, or if it has been replaced with something else.
source share