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:
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?)
Solved! Go to Solution.
Solved by Alexander.Rivilis. Go to Solution.
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
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
"OPMNetExt.vcproj" Are you referencing the project file or ".dll"
Reference the ".dll"
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.
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.
Hi,
I tried to migrate the sample OPMNetExt 2010 project to AutoCAD 2013 x64 VS2012, but since my visual studio skills are quite low and C++/arx skills non existant, I failed miserably, I tried updating all the header files from the 2013 Object Arx SDK but no luck. (I'm just an AutoCAD user not developer that originally played in the VBA/ActiveX stuff and have now moved over to .NET).
This would be a great feature for an amature developer like me to have access to, I have started looking at your blog articles on the display Overrule API which seems to be nice and simple, but I'm thinking I can't really put thoose tools to good use unless I can add additional OPM properties on the objects?
Should it be simple for me to take this project and migrate from one AutoCAD version to another without actually having any clue about the C++/Arx parts? Or are there any plans for a wrapper like this to be included directly in AutoCAD .NET api?
Many thanks,
Graham.
Many thanks Kean - email sent!
Actually my company do have a lot of Arx/C++ developers and ADN professional membership, so I can get one of them to help me port the code next time im in the office! But I'm still a bit concerened about the availability of this functionality in furture versions - should I be?
Just to clairfy what I'm thinking this will allow me to do all within .NET....
Create overrules on display of objects
Add additional OPM properties on those objects (persisted using xdata)
Add additional grips to objects again using overrules
Can I then rename that object in the OPM (so it looks like a custom object to the user)?
Is that how Autodesk intended the Overrule API to be used?
Thanks,
Graham
Hi Graham,
> Create overrules on display of objects
You should be able to do this, already, using a DrawableOverrule. But yes, you can use this in conjunction with data made editable via this module.
> Add additional OPM properties on those objects (persisted using xdata)
> Add additional grips to objects again using overrules
Again, independent functionality, but still possible: http://through-the-interface.typepad.com/through_the_interface/2009/08/knowing-when-an-autocad-objec...
> Can I then rename that object in the OPM (so it looks like a custom object to the user)?
That may be possible, but I haven't tried it. You should ping ADN on that one, unless someone else here has managed it and can chime in.
Regards,
Kean
Dear Kean! We I faced with exactly the same problem. Cannot launch your code on win7 x64 Autocad Civil 3D 2011/2012. I mean I can build a solution and netload an apliccation but id doesn't work without any exception or message.
Thanks in advance!
Thanks to Cyrille Fauvel for updating the project to make it work with AutoCAD 2016 x64.
You can find the source here:
https://github.com/cyrillef/OPMNetExt
And a release build here:
https://github.com/cyrillef/OPMNetExt/tree/master/OPMNetSample
Kean
Hi
Any change someone have "asdkOPMNetExt.dll" for Autocad 2015 64Bit
I download OPM_NET_2010 and try to compile for Autodesk 2015 64Bit
I have never use C++
I add Additional Include Directories = C:\SDK-FDO\ObjectARX 2015\inc
and thing I change to 64Bit
I get this warning
Error 3 error C3624: 'System::Dynamic::IDynamicMetaObjectProvider': use of this type requires a reference to assembly 'System.Core' c:\sdk-fdo\objectarx 2015\inc\mgdinterop.h 263 1 OPMNetExt
IntelliSense: PCH warning: \StdAfx.cpp 1 1 OPMNetExt
Regards
Sgear
I try to Compile to 2015
https://github.com/cyrillef/OPMNetExt
LNK2038: mismatch detected for _MSC_VER': value '1700' doesn't match value '1800
error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in acrxEntryPoint.obj \rxapi.lib(libinit.obj) asdkOPMNetExt
@Sgear wrote:
I try to Compile to 2015
https://github.com/cyrillef/OPMNetExt
LNK2038: mismatch detected for _MSC_VER': value '1700' doesn't match value '1800
error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in acrxEntryPoint.obj \rxapi.lib(libinit.obj) asdkOPMNetExt
You have to compile this code only with VS 2012 Update 4
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Can't find what you're looking for? Ask the community or share your knowledge.