Hello
In .net form i had button
on button click i call this method " LineLength".
But at this line it is giving error
The error is "Object refernec not set to an instantiate an object:
and null refernce exception is occured".
But when we are using NETLOAD this is working fine.
When I click the button this is getting error.
Not reconizing any classes Like Editor and DataBase and gives the error.
what should i do for rectifying the problem.
Code:
Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocum
Here it is not recognizing any class like editor, dataBase
using System;
using System.Windows.Forms;
using Autodesk.AutoCAD.Interop;
import Autodesk.AutoCAD.Interop.Common;
import acadApp = Autodesk.AutoCAD.ApplicationServices.Application;
import System.Runtime.InteropServices;
import Autodesk.AutoCAD.Runtime;
import Autodesk.AutoCAD.Geometry;
import Autodesk.AutoCAD.EditorInput;
import Autodesk.AutoCAD.DatabaseServices;
Public Shared Sub LineLength()
Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocum ent.Editor
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim t As Transaction = db.TransactionManager.StartTransaction()
Dim idArray() As ObjectId = Nothing
plese recitfy the problem.
Thaqs in advance