Custom Entity, help me

Custom Entity, help me

Anonymous
Not applicable
1,114 Views
5 Replies
Message 1 of 6

Custom Entity, help me

Anonymous
Not applicable

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?

0 Likes
1,115 Views
5 Replies
Replies (5)
Message 2 of 6

Balaji_Ram
Alumni
Alumni

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

0 Likes
Message 3 of 6

Anonymous
Not applicable

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

0 Likes
Message 4 of 6

artc2
Autodesk
Autodesk

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.

0 Likes
Message 5 of 6

Anonymous
Not applicable

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

0 Likes
Message 6 of 6

Balaji_Ram
Alumni
Alumni

Hi !

 

Happy to know you too Smiley Happy

 

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

 

 

 

 

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes