<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Originally Unmanaged DBX with .Net in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5663156#M39857</link>
    <description>&lt;P&gt;Balaji,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am aware of the wrapper thing and I have created wrappers in the other project, which we created from scratch. That is working fine. But for now we need to use our DBX project. We need to add wrappers to some existing code. That's what I am doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have added the objectarx/inc and objectarx/inc-64 in the include folders. Is there anything else that needsto be added?&lt;/P&gt;
&lt;P&gt;Since these are compile errors, I am assuming there are some include settings or preprocessor settings I am not doing correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using ATL in this project, which we are not using in the project we created for wrappers. Does that make any difference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2015 17:43:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-03T17:43:37Z</dc:date>
    <item>
      <title>Using Originally Unmanaged DBX with .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5655744#M39855</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently we have a unmanaged DBX/ARX application working fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From future point of view, we plan to go in .Net direction. We want to do any further development in .Net, but want to keep using what we have currently in unmanaged code. The plan is to modify existing DBX by adding wrappers and make it usable to a new .Net ARX module we are adding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However I am struggling with making the DBX code mixed mode and adding wrappers to it. First of all, is it something doable? Am I going down the wrong track?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is, then what do I need to do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We already built a different project as a proof of concept that has a DBX module with wrappers and a .Net ARX module. So I am familiar with that part. But how to make an existing DBX unmanaged module work with a new .Net ARX module and an old C++ ARX module at the same time?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made some changes to the project settings and trying to get it compiled. I am getting compile errors in mgdinterop.h&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;error C3083: 'Geometry': the symbol to the left of a '::' must be a type&lt;/P&gt;
&lt;P&gt;1&amp;gt;mgdinterop.h(179): error C2039: 'Vector3d' : is not a member of 'Autodesk::AutoCAD'&lt;/P&gt;
&lt;P&gt;1&amp;gt;mgdinterop.h(179): error C2146: syntax error : missing ';' before identifier 'ToVector3d'&lt;/P&gt;
&lt;P&gt;1&amp;gt;mgdinterop.h(179): error C2433: 'Vector3d' : 'inline' not permitted on data declarations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 19:58:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5655744#M39855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-28T19:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using Originally Unmanaged DBX with .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5659142#M39856</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;You may need to weigh the &lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;gain achieved by creating a&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;managed wrapper for your custom entity and its access from your other .Net code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Other developers&amp;nbsp;in this forum who have tried doing that in their work might be able to comment.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Here are my thoughts :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But please note that ObjectARX C++ API is not going away any time soon and creating custom entity is still only possible using C++.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can write your new code in .Net if you wish, but will still need C++ to implement custom entities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To access your dbx from .Net code, you can either write managed wrapper for it or a much simpler way would be to simply expose methods in your arx&lt;/P&gt;
&lt;P&gt;module that will create your custom entity based on parameters. You can have the exposed C++ methods invoked from your .Net code using dllimport.&lt;/P&gt;
&lt;P&gt;This is much simpler approach&amp;nbsp;than creating managed wrapper and is similar to how the AutoCAD's COM wrapper methods&amp;nbsp;allow you to create native AutoCAD&amp;nbsp;entities with only values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About the compile error that you are getting in your project, have you checked the "Reference directories" in the project settings ?&lt;/P&gt;
&lt;P&gt;It should be pointing to the inc folder in ObjectARX SDK folder. Please try the sample from this blog post if that does not help :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2013/05/creating-managed-wrapper-for-custom-entity.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2013/05/creating-managed-wrapper-for-custom-entity.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Balaji&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 09:19:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5659142#M39856</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2015-06-01T09:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using Originally Unmanaged DBX with .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5663156#M39857</link>
      <description>&lt;P&gt;Balaji,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am aware of the wrapper thing and I have created wrappers in the other project, which we created from scratch. That is working fine. But for now we need to use our DBX project. We need to add wrappers to some existing code. That's what I am doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have added the objectarx/inc and objectarx/inc-64 in the include folders. Is there anything else that needsto be added?&lt;/P&gt;
&lt;P&gt;Since these are compile errors, I am assuming there are some include settings or preprocessor settings I am not doing correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using ATL in this project, which we are not using in the project we created for wrappers. Does that make any difference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 17:43:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5663156#M39857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T17:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Originally Unmanaged DBX with .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5663186#M39858</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;maybe if you could post a small or extract test VS solution, so others might give it a test...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;do you have in your MGD project inside of the header file StdAfx.h - a call to?: &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#using &amp;lt;acdbmgd.dll&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;did you used the arx wizard to generate an skeleton solution for a mix project? and simple adding in there your previous classes?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.-&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 18:06:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5663186#M39858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-03T18:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Originally Unmanaged DBX with .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5664017#M39859</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see any issue in using ATL in a mixed managed project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After i enabled support for ATL in project settings and added the references in the mixed managed project, it&amp;nbsp;compiled without any errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I did reproduce the compile errors that you mentioned when the references were not added to the project settings as seen in the attached screenshots.&amp;nbsp;If the references were added, it compiled ok.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;@Anonymous&amp;nbsp;mentioned, it might help to create a new project using the ObjectARX Wizard and add the existing files to it.&lt;/P&gt;
&lt;P&gt;If you can share a non-confidential sample project to reproduce the errors, i can take a look at it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Balaji&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2015 09:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/using-originally-unmanaged-dbx-with-net/m-p/5664017#M39859</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2015-06-04T09:20:06Z</dc:date>
    </item>
  </channel>
</rss>

