<?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: .Net Help? With custom objects. in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484356#M14703</link>
    <description>&lt;P&gt;I have it working. But, I wish Autodesk would update their examples provide better documentation. The polysamps application shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;static AcMgObjectFactoryBase __nogc * __nogc * g_pEs = NULL;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed it to:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;static AcMgObjectFactoryBase** g_pES = NULL;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it worked. As for loading the .net DBX I have used DynamicLinker.LoadModule() in the arx application Initialize() method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just posting this for reference purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2012 19:25:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-04T19:25:54Z</dc:date>
    <item>
      <title>.Net Help? With custom objects.</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484132#M14701</link>
      <description>&lt;P&gt;OK, I have an arx .net project, a dbx project, and a dbx.net wrapper project. This is all working fine except the way I have to open my custom objects in the same manner that I can open native objects. Basically, if I wanted to open a line (native) object, I can get the .net wrapped object from the object id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;using (Transaction tr = curDb.TransactionManager.StartTransaction())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Line line = tr.OpenObject(lineId, OpenMode.ForRead) as Line;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... Do something with line here.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my custom object, I have to open the custom as an RXObject first then create the .net object passing in the unmanaged object as a parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;using (Transaction tr = curDb.TransactionManager.StartTransaction())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RXObject rxObj = tr.OpenObject(lineId, OpenMode.ForRead) as RXObject;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(rxObj != null)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustObjNet custObj = new CustObjNet(rxObj.UnamanagedObject, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... Do something with custObj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... Do something with line here.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Is the above code correct for custom objects? Is there something that can be done in the .net Wrapper to make it behave like the native entity wrappers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike B&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 17:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484132#M14701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T17:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: .Net Help? With custom objects.</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484230#M14702</link>
      <description>&lt;P&gt;OK, WRT to the original post, I have found that I needed to implement the AcMgObjectFactoryBase in my dbx .net project. I have done this by adding a main.cpp similar to the Polysamps example and implemented the acrxEntryPoint. I believe this will solve the original problem, but&amp;nbsp;the entry point is not being called.&amp;nbsp;I don't need to&amp;nbsp;"NETLOAD" the dbx .net dll but&amp;nbsp;it must need to be loaded somewhere in order for the entry point to be called no? Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike B&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484230#M14702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T18:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: .Net Help? With custom objects.</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484356#M14703</link>
      <description>&lt;P&gt;I have it working. But, I wish Autodesk would update their examples provide better documentation. The polysamps application shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;static AcMgObjectFactoryBase __nogc * __nogc * g_pEs = NULL;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed it to:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;static AcMgObjectFactoryBase** g_pES = NULL;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it worked. As for loading the .net DBX I have used DynamicLinker.LoadModule() in the arx application Initialize() method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just posting this for reference purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 19:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/3484356#M14703</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: .Net Help? With custom objects.</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/4677121#M14704</link>
      <description>&lt;P&gt;Thank you mbujak for the helpful information&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 04:46:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/net-help-with-custom-objects/m-p/4677121#M14704</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-06T04:46:31Z</dc:date>
    </item>
  </channel>
</rss>

