ObjectARX

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

Custom Entity, help me

250 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: 749
Registered: ‎03-21-2011
Message 2 of 6 (240 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 (229 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: 229
Registered: ‎06-08-2010
Message 4 of 6 (213 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 (205 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: 749
Registered: ‎03-21-2011
Message 6 of 6 (197 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.