<?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: Snapping on Proxy Entities/Objects in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581179#M7308</link>
    <description>&lt;P&gt;That would indeed be nice! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But I understand that it is not directly possible right now so I am not going to put more time in it and will accept this as the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for all the help!&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2017 08:21:53 GMT</pubDate>
    <dc:creator>bart</dc:creator>
    <dc:date>2017-11-29T08:21:53Z</dc:date>
    <item>
      <title>Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7578343#M7303</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if it is possible to create custom entities that can be snapped on when they are turned into proxy entities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already read and implemented the following information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/OARXMAC-DevGuide/files/GUID-83C009B4-70A2-479B-B5AD-F93BEDD76892-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/OARXMAC-DevGuide/files/GUID-83C009B4-70A2-479B-B5AD-F93BEDD76892-htm.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this works fine, I can now MOVE and ERASE my proxy entities, but I cannot find anything about allowing SNAP on my proxy entities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any information about this, or example code in c++ , will be greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:16:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7578343#M7303</guid>
      <dc:creator>bart</dc:creator>
      <dc:date>2017-11-28T13:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7579029#M7304</link>
      <description>Proxies don't provide any way to support snap or grip points for the entity they represent.&lt;BR /&gt;&lt;BR /&gt;You could use overrules to provide osnap and/or grips for proxies, but that would apply to all proxy entities regardless of what entity types they represent and your overrule would not have access to any of the data specific to the entity the proxy represents.</description>
      <pubDate>Tue, 28 Nov 2017 16:07:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7579029#M7304</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2017-11-28T16:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7579194#M7305</link>
      <description>&lt;P&gt;I wonder whether you mixed up the terms "Proxy Entity" and "Custom Entity".&lt;/P&gt;
&lt;P&gt;If AutoCAD can't find an Object Enabler for a &lt;STRONG&gt;Custom Entity&lt;/STRONG&gt; class, it treats this unknown entity as a &lt;STRONG&gt;Proxy&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;If you implement a Custom Entity class, than you write the Object Enabler yourself. And you can implement snap-methods in the entity class by overwriting the appropriate virtual methods:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    // AcDbOsnapOverrule
    virtual Acad::ErrorStatus   subGetOsnapPoints(
                                    AcDb::OsnapMode     osnapMode,
                                    Adesk::GsMarker     gsSelectionMark,
                                    const AcGePoint3d&amp;amp;  pickPoint,
                                    const AcGePoint3d&amp;amp;  lastPoint,
                                    const AcGeMatrix3d&amp;amp; viewXform,
                                    AcGePoint3dArray&amp;amp;   snapPoints,
                                    AcDbIntArray &amp;amp;   geomIds) const;
    virtual Acad::ErrorStatus   subGetOsnapPoints(
                                    AcDb::OsnapMode     osnapMode,
                                    Adesk::GsMarker     gsSelectionMark,
                                    const AcGePoint3d&amp;amp;  pickPoint,
                                    const AcGePoint3d&amp;amp;  lastPoint,
                                    const AcGeMatrix3d&amp;amp; viewXform,
                                    AcGePoint3dArray&amp;amp;   snapPoints,
                                    AcDbIntArray &amp;amp;   geomIds,
                                    const AcGeMatrix3d&amp;amp; insertionMat) const;
&lt;/PRE&gt;
&lt;P&gt;These will be called by AutoCAD, if your Object Enabler is loaded.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 16:48:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7579194#M7305</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2017-11-28T16:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581137#M7306</link>
      <description>&lt;P&gt;Hi tbrammer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying! I don't think I am mixing them up. When I load my drawing with my own custom entities in my objectarx project, it has snap points and grip points. These snap points and grip points are indeed created by overwriting the virtual methods you referenced.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I load the same drawing in autocad without my objectarx project (the&amp;nbsp;&lt;SPAN&gt;Object Enabler), my custom entities become proxy entities as suspected. But these proxy entities don't have any grip or snap points. So I was wondering if this is normal? And how I could create snap or grip points on my custom entities that still remain there when they become proxy entities.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My custom entities are inherited from&amp;nbsp;AcDbEntity.&lt;/SPAN&gt;&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, 29 Nov 2017 08:00:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581137#M7306</guid>
      <dc:creator>bart</dc:creator>
      <dc:date>2017-11-29T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581168#M7307</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;(...)&lt;SPAN&gt;these proxy entities don't have any grip or snap points. So I was wondering if this is normal? And how I could create snap or grip points on my custom entities that still remain there when they become proxy entities. &lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;AutoCAD doesn't "store" the snappoints together with the entity. It calls the &lt;FONT face="courier new,courier"&gt;subGetOsnapPoints()&lt;/FONT&gt; methods directly from the OE if it needs snappoints. So snapping just can't work if the OE isn't loaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It &lt;EM&gt;would&lt;/EM&gt;&amp;nbsp; be nice to have an option to store snappoint types like "end", "center" directly at custom entities. So AutoCAD could snap to proxies even without OE. Snappoint types like "intersection" still definitely need an OE.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 08:16:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581168#M7307</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2017-11-29T08:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581179#M7308</link>
      <description>&lt;P&gt;That would indeed be nice! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But I understand that it is not directly possible right now so I am not going to put more time in it and will accept this as the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for all the help!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 08:21:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581179#M7308</guid>
      <dc:creator>bart</dc:creator>
      <dc:date>2017-11-29T08:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Snapping on Proxy Entities/Objects</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581311#M7309</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/656250"&gt;@artc2&lt;/a&gt; pointed out how you could use overrules to implement snap for proxies.&lt;/P&gt;
&lt;P&gt;He is right, that your overrule would apply to all proxy types. But you can determine the original class name of the proxy entity with &lt;FONT face="courier new,courier"&gt;AcDbProxyEntity::originalClassName()&lt;/FONT&gt; and implement snapping only for your class.&lt;/P&gt;
&lt;P&gt;But:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;if no OE is loaded you won't have acces to the data of the custom entity. How would you determine snappoints than? &lt;BR /&gt;This could only work, if you add snap data as XData / XRecord.&lt;/LI&gt;
&lt;LI&gt;This is pointless at all, because it would require a DBX/ARX to be loaded, that implements the overrule. &lt;BR /&gt;So why not simply load the OE instead?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I can only imagine this scenario which &lt;EM&gt;could&lt;/EM&gt; make sense:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You don't want to publish your OEs for some reason&lt;/LI&gt;
&lt;LI&gt;You add snappoints as XData to all your custom entities&lt;/LI&gt;
&lt;LI&gt;You create and publish a DBX that implements snapping based on your XData snappoints for proxies. This can be used for all your custom entity classes.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 29 Nov 2017 09:06:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/snapping-on-proxy-entities-objects/m-p/7581311#M7309</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2017-11-29T09:06:03Z</dc:date>
    </item>
  </channel>
</rss>

