Is it possible to add custom properties for object (for example Line) with .NET?

Is it possible to add custom properties for object (for example Line) with .NET?

Anonymous
Not applicable
3,728 Views
4 Replies
Message 1 of 5

Is it possible to add custom properties for object (for example Line) with .NET?

Anonymous
Not applicable

I saw that I can add Fields or store data in dictionaty, but those data are not showed in Properties Windows.

 

In not Acad-application (but .net application) I can create property description and add "virtual" properties with the help of designer. In Aced it doesn't work.

 

Is it possible to add custom properties from .NET?

 

Pavel.

0 Likes
3,729 Views
4 Replies
Replies (4)
Message 2 of 5

Balaji_Ram
Alumni
Alumni

Hello,

 

Yes, It is possible. Although the Property Palette exposes COM interfaces that we will need to use, there is also a .Net wrapper for it. Here is the link :

http://through-the-interface.typepad.com/through_the_interface/2009/03/exposing-autocads-properties-...



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks!!

 

I'll try it.

 

Pavel.

0 Likes
Message 4 of 5

DiningPhilosopher
Collaborator
Collaborator

@Balaji_Ram wrote:

Hello,

 

Yes, It is possible. Although the Property Palette exposes COM interfaces that we will need to use, there is also a .Net wrapper for it. Here is the link :

http://through-the-interface.typepad.com/through_the_interface/2009/03/exposing-autocads-properties-...


I don't believe any of that material at the link you posted is of any use, as of AutoCAD 2013, which uses a different set of APIs for OPM properties, that has no dependence on COM or Windows

0 Likes
Message 5 of 5

Balaji_Ram
Alumni
Alumni

Hi,

 

AutoCAD 2013 did introduce the Non-COM property system, which is now only accessible using ObjectARX.

But this does not stop us from using the earlier COM based property APIs. Those will still work.

 

If you want to work with the OPM using the AutoCAD .Net API, then we have to rely on the COM based property system (the wrapper for it for which I posted the link) since there is no wrapper available for the new Non-COM property system.

 

Edited :

 

Here is the link for the DevTV on the new Non-COM property system, just in case you need it :

http://adndevblog.typepad.com/autocad/2012/04/devtv-non-com-property-system.html

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes