.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using object browser in Visual Studio with Autocad API

1 REPLY 1
Reply
Message 1 of 2
viktors.zilinskis
481 Views, 1 Reply

Using object browser in Visual Studio with Autocad API

Hi! I have (probably) a  very basic question - is it possible to figure out what code should I write to access certain classes/objects/properties etc using object browser? For example, if I write:

 

Document MyDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

 then MdiActiveDocument is available "under" Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager. However If I browse to DocumentManager using ObjectBrowser then it is represented with a property icon and there is nothing that indicates (to me) that I might access MidActiveDocument from there. If I browse to Autodesk.AutoCAD.ApplicationServices.DocumentCollection I will find that MdiActiveDocument resides there. However I will not be able to access it by writing corresponding code:

Autodesk.AutoCAD.ApplicationServices.DocumentCollection

 What I wonder is - is there any use of ObjectBrowser when working with Autocad API? I have seen in other examples how does one access MdiActiveDocument in his/her code but I can not understand why. Is there any way to "reconstruct" this logic or it is just the way it is? Thanks in advance!

 

1 REPLY 1
Message 2 of 2
cdinten
in reply to: viktors.zilinskis

you have to distinguish the class definition and the instance of this class, and i recommand using .net Reflector rather than object browser.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost