.NET

.NET

Reply
Contributor
13 Posts
0 Kudos
Registered: ‎08-07-2010
Post 1 of 16

How to run OPM sample from Kean's blog?

1183 Views, 15 Replies
09-23-2010 07:59 PM

has anyone tried to get the following sample to run from c# express?

 

re: Modifying an AutoCAD object’s state via a dynamic property defined using .NET

URL:

http://through-the-interface.typepad.com/through_the_interface/2009/05/modifying-an-autocad-objects-...

 

This post has link to sample project for accessing property pallet, but I can't figure out how to make it work.  There is a mixture of c++ and c# and I can't find what modules I have to save to acad's folder (per kean's instructions) and what reference to use to replace the one that doesn't load when I try to run the sample project he supplied.

 

When I run the csproj file in the downloaded sample project a reference comes up "missing"

Warning 1 The referenced component 'OPMNetExt' could not be found.  

There is no OPMNetExt.dll in the downloaded sample, there is an OPMNetExtSample.dll and I placed that in the acad folder as he directed but that isn't the right one.

 

I also get the error:

Error 2 The type or namespace name 'OPM' does not exist in the namespace 'Autodesk.AutoCAD.Windows' (are you missing an assembly reference?) 

 

and the error:

Error 3 The type or namespace name 'IDynamicProperty2' could not be found (are you missing a using directive or an assembly reference?)

 

Employee
27 Posts
5 Kudos
Registered: ‎01-17-2005
Post 2 of 16

Re: How to run OPM sample from Kean's blog?

09-24-2010 08:22 AM in reply to: elmarko

You should be able to pick up the compiled C++ module (asdkOPMNetExt.dll) from the win32-bin folder of the appropriate ZIP file (depending on your AutoCAD version). I don't have a 64-bit version, unfortunately.

 

Kean

Contributor
13 Posts
0 Kudos
Registered: ‎08-07-2010
Post 3 of 16

Re: How to run OPM sample from Kean's blog?

09-24-2010 07:55 PM in reply to: kean.walmsley

I did copy that to the acad folder and set a reference to it.  However the reference is asdkOPMNetExt, leaving still a OPMNetExt reference in the project as missing....Maybe this has something to do with me being on express version 2008?

fwiw I'm trying the 2009 version first, though I could try both.

where is OPMNetExt object that needs referenced?

 

I'm double clicking OPMNetSample.csproj to start the sample project, is that what I should be doing?

(it ran through the upgrade process and I replaced the references to acdbmgd and acmgd with my local versions in C:\ObjectARX 2010\inc-win32

 

the warning i get now is: Warning 1 The referenced component 'OPMNetExt' could not be found.  
when I try to load OpmNetExt I get the error dialog:

"Path to OPMNetExt.vcproj" cannot be opened because its project type(.vcproj) is not supported by this version of the application.  To open it, please use a version that supports this type of project.

 

I'm lost, sorry.

 

mark

 

Employee
27 Posts
5 Kudos
Registered: ‎01-17-2005
Post 4 of 16

Re: How to run OPM sample from Kean's blog?

09-27-2010 05:50 AM in reply to: elmarko

OPMNetExt is the logical name the project uses for the asdkOPMNetExt.dll assembly. The project loads just fine for me in Visual Studio 2008 (I haven't tried Express, but I would not expect it to behave differently).

 

Have you tried removing the OPMNetExt reference and re-adding it (by browsing to asdkOPMNetExt.dll)?

 

Kean

Valued Mentor
372 Posts
13 Kudos
Registered: ‎01-20-2010
Post 5 of 16

Re: How to run OPM sample from Kean's blog?

09-27-2010 07:03 AM in reply to: kean.walmsley

"OPMNetExt.vcproj" Are you referencing the project file or ".dll"

 

Reference the ".dll"

You can also find your answers @ TheSwamp
Employee
27 Posts
5 Kudos
Registered: ‎01-17-2005
Post 6 of 16

Re: How to run OPM sample from Kean's blog?

09-27-2010 07:06 AM in reply to: Jeffrey_H

The DLL. You should not need to touch the Visual C++ project file (.vcproj) at all.

 

Kean

Valued Mentor
372 Posts
13 Kudos
Registered: ‎01-20-2010
Post 7 of 16

Re: How to run OPM sample from Kean's blog?

09-27-2010 07:24 AM in reply to: kean.walmsley

Hey Kean

I noticed this in elmarko's post

 

"Path to OPMNetExt.vcproj" cannot be opened because its project type(.vcproj) is not supported by this version of the application.  To open it, please use a version that supports this type of project.

 

I was just letting him know that was problem and I really enjoy and pick up alot good stuff from your blog.

 

 

You can also find your answers @ TheSwamp
Employee
27 Posts
5 Kudos
Registered: ‎01-17-2005
Post 8 of 16

Re: How to run OPM sample from Kean's blog?

09-27-2010 07:25 AM in reply to: Jeffrey_H

Thanks, Jeffrey - I replied quickly without realising you'd stepped in. :-)

 

Kean

Member
4 Posts
0 Kudos
Registered: ‎06-07-2010
Post 9 of 16

Re: How to run OPM sample from Kean's blog?

04-24-2013 12:27 PM in reply to: kean.walmsley

Dear Kean,

 

could it meanwhile be possible to get a 64 bit Version of the asdkOPMNetExt.dll?

If yes, would it be too unpolite to ask you to tell me how I could get it?

 

Det.

Employee
27 Posts
5 Kudos
Registered: ‎01-17-2005
Post 10 of 16

Re: How to run OPM sample from Kean's blog?

04-24-2013 06:15 PM in reply to: detlevfabricius4418
Dear Det,

Just email me at kean.walmsley@autodesk.com - I'll send it to you.

Regards,

Kean
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post