.NET

.NET

Reply
Member
3 Posts
0 Kudos
Registered: ‎05-25-2013
Post 1 of 4

How to implement Drop-down list (based on IDynamicEnumProperty) in OPM?

449 Views, 3 Replies
05-25-2013 12:20 PM

Hi!

Is there somone who can explain/show a sample of how a custom drop-down list in OPM can be implemented? Based on some articels by Kean Walmsley, I have successfully implemented categorized properties in the OPM using a .NET wrapper and C#. I have a class imlementing the members of the IDynamicEnumProperty, ICategorizeProperties and IDynamicProperty2 interfaces (based on ObjectARX 2013).

 

However, I do not really understand how to code custom drop-down list using .NET wrapper and OPM. I am using AutoCAD 2013 and 2014. I have read a lot of posts regarding OPM but there was no helpful information in regards to create custom drop-down lists. I will greatly appreciate any help showing how to achieve that or giving a link to more details.

 

Regards,
Markus
ADN Support Specialist
762 Posts
100 Kudos
Registered: ‎03-21-2011
Post 2 of 4

Re: How to implement Drop-down list (based on IDynamicEnumProperty) in OPM?

06-06-2013 10:17 AM in reply to: markus.keller

Hi Markus,

 

Sorry for the delay.

 

I have attached a sample project that my colleague Philippe Leefsma had created some time back to demonstrate this.

 

Hope this helps.



Balaji
Developer Technical Services
Autodesk Developer Network

Member
3 Posts
0 Kudos
Registered: ‎05-25-2013
Post 3 of 4

Re: How to implement Drop-down list (based on IDynamicEnumProperty) in OPM?

06-09-2013 11:24 AM in reply to: Balaji_Ram
Hi Balaji,

Thank you for the response and the example code which works perfect in my case. Cool stuff. I had to tweak the C++ project to make it compile in my environment, but it finally worked well for me.
You also solved another issue by showing how to use a CustomProperty constructor to initialize field data overriding some of the implemented interface members in the DynamicProperty class. This was actually a minor issue I was still working on ... so, thank you for solving this also :smileywink:

Regards,
Markus
Regards,
Markus
ADN Support Specialist
762 Posts
100 Kudos
Registered: ‎03-21-2011
Post 4 of 4

Re: How to implement Drop-down list (based on IDynamicEnumProperty) in OPM?

06-09-2013 09:22 PM in reply to: markus.keller

Hi Markus,

 

Glad to hear that the sample project was helpful.

 

I have communicated your appreciation to Philippe who is author of that sample project.

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!