ObjectARX

Reply
Member
quanghung1020
Posts: 4
Registered: ‎06-05-2011
Message 1 of 6 (244 Views)

Custom Entity, help me

244 Views, 5 Replies
06-05-2011 08:58 AM

Sorry my english is not best!

I have a question. I want to generate a my custom entity class in ObjectDBX, which inherit AcDb Entity, either polyline or spline. That is, in the Autocad, with my Custom Entity class i can daw my custom polyline or spline. Please tell me how to do that?

ADN Support Specialist
Balaji_Ram
Posts: 693
Registered: ‎03-21-2011
Message 2 of 6 (234 Views)

Re: Custom Entity, help me

06-05-2011 09:00 PM in reply to: quanghung1020

Hello,

 

You may install ObjectARX Wizard and then use it to create this custom entity.

 

I have attached a screenshot outlining the steps to get you started.

 

Cheers,

 

Balaji

 

Developer Technical Services

 



Balaji
Developer Technical Services
Autodesk Developer Network

Member
quanghung1020
Posts: 4
Registered: ‎06-05-2011
Message 3 of 6 (223 Views)

Re: Custom Entity, help me

06-07-2011 07:43 PM in reply to: Balaji_Ram

thank you so much!!! I'm sorry, How to my custom entity class inherits both Polyline, Spline and Text

Employee
artc2
Posts: 206
Registered: ‎06-08-2010
Message 4 of 6 (207 Views)

Re: Custom Entity, help me

06-08-2011 09:40 AM in reply to: quanghung1020

Custom objects/entities cannot inherit from multiple other classes in the ARX runtime tree. The reason is that the ARX runtime tree implementation cannot deal with multiple inheritance within the tree.

 

So, your custom entity can derive from AcDbPolyline, AcDbSpline, or AcDbText, but not all three (or even two) at the same time.

 

If you really need to the data and/or functionality of all three, then perhaps you could embed one of each of those three entity types within your custom entity and then implement methods on your custom entity that call through to the embedded entities' methods.

 

Embedding entities does require some special handling for dxf filing.  There is a section about this in the ObjectARX Developer's Guide.

Member
quanghung1020
Posts: 4
Registered: ‎06-05-2011
Message 5 of 6 (199 Views)

Re: Custom Entity, help me

06-08-2011 08:51 PM in reply to: quanghung1020

Thank you for all reply so much! I'm a VietNamess, I'm learning ObjectARX, I hope to receive more help from you. Happy to be acquainted with all of you, my yahoo nickname's mcx_bkhn

ADN Support Specialist
Balaji_Ram
Posts: 693
Registered: ‎03-21-2011
Message 6 of 6 (191 Views)

Re: Custom Entity, help me

06-09-2011 12:21 AM in reply to: quanghung1020

Hi !

 

Happy to know you too :smileyhappy:

 

Good luck with your ObjectARX learning and feel free post your doubts in this forum.

 

 

 

 

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.