Which include defines AcadBlockReference, AcadCircle, etc.?

Which include defines AcadBlockReference, AcadCircle, etc.?

Anonymous
Not applicable
832 Views
4 Replies
Message 1 of 5

Which include defines AcadBlockReference, AcadCircle, etc.?

Anonymous
Not applicable

So, I have had success now opening an AutoCAD instance and document from an external program through ActiveX/COM.

 

I have been able to add all sorts of objects and even insert a block.

 

Everything is going great. Except I need to be able to store a reference to the objects that I have now figured out how to add. And this is where the trouble comes up again. The reference documents are really good, with one MASSIVE exception. They don't tell you where the classes can be found. I cannot find anywhere that states what I need to reference or include to use the AcadEntity and its child classes.

 

So, once again, if I could get some help in determining which dll or tlb I need to reference and which using statement I need to add so that I can use these in my program I would be very grateful.

 

Thank you,

Michael

0 Likes
Accepted solutions (1)
833 Views
4 Replies
Replies (4)
Message 2 of 5

Ed__Jobe
Mentor
Mentor
Accepted solution

Typically, you would use the Object Browser in Visual Studio to examine the object tree. For ActiveX, there is a help system located here. If you install the VBA enabler, it installs acadauto.chm, which I prefer over online help.

 

The ActiveX objects are usually prefixed with Acad?? as opposed to ac??. They are included in the interop libraries you already referenced.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 5

Anonymous
Not applicable

Ed,

 

Thank you.

 

Looking into what you provided I found that I needed to add "using Autodesk.AutoCAD.Interop.Common;" to my includes.

 

Michael

0 Likes
Message 4 of 5

Ed__Jobe
Mentor
Mentor

You might also want to include a line that sets the app object.

using AcadApp = Autodesk.AutoCAD.ApplicationServices.AcadApplication;

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 5

Anonymous
Not applicable

I will do that.

 

Thank you

0 Likes