Can someone explain something to me?
I am trying to get the active document in AutoCAD using C#. To do this I am using:
Document doc = Autodesk.AutoCAD.ApplicationServices.DocumentManager.MdiActiveDocument;
To me this seems as if it should work as I am declaring the variable doc as a Document and assigning it as the active document in AutoCAD (MdiActiveDocument returns a Document). However when I try to compile my code I get an error stating.
c:\Documents and Settings\TJRiley\My Documents\SharpDevelop Projects\KSSetup\MainForm.cs(239,30): error CS0120: An object reference is required for the nonstatic field, method, or property 'Autodesk.AutoCAD.ApplicationServices.DocumentManager.MdiActiveDocument'
Can someone please explain to me what this error message means?
Thanks,
Tim