<?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: How to display sub-entity's properties in Property Palette? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3623600#M14335</link>
    <description>&lt;P&gt;Your&amp;nbsp;code has resolved my question.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;Thanks&lt;/FONT&gt; a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Sep 2012 08:59:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-18T08:59:41Z</dc:date>
    <item>
      <title>How to display sub-entity's properties in Property Palette?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3614412#M14331</link>
      <description>&lt;P&gt;How to display sub-entity's properties in Property Palette? I had tryed to run SubEntity sample in autocad2007/8/9,but Property Palette can't display the properties of the sub-entity selected.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2012 13:07:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3614412#M14331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-11T13:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to display sub-entity's properties in Property Palette?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3620510#M14332</link>
      <description>&lt;P&gt;Sorry, This is a known issue.&lt;/P&gt;
&lt;P&gt;To my understanding, the sample was not fixed.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 14:51:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3620510#M14332</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2012-09-14T14:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to display sub-entity's properties in Property Palette?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3621282#M14333</link>
      <description>&lt;P&gt;Thanks for you reply.&lt;/P&gt;&lt;P&gt;Can you tell me the other method to display sub-entity's properties in Property Palette?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2012 02:58:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3621282#M14333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-15T02:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to display sub-entity's properties in Property Palette?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3623480#M14334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;P&gt;I was searching for a fixed version of that sample and finally found it. Thanks to my colleague Gopinath Taget who got this sample working with help from the engineering team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the changes and the sample project :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;The key is to inherit from IAcadSubEntity in the IDL file for your interface:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;interface&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; ICrank : IAcadSubEntity&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;And in the implementation header, Inherit from the IAcadBaseSubEntityImpl and IOPMPropertyExtensionImpl templates like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: green; font-family: Consolas; font-size: 10pt;"&gt;//----- CCrank&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; ATL_NO_VTABLE CCrank : &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;public&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; CComObjectRootEx&amp;lt;CComSingleThreadModel&amp;gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;public&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; CComCoClass&amp;lt;CCrank, &amp;amp;CLSID_Crank&amp;gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;public&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; ISupportErrorInfo,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;public&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; IAcadBaseSubEntityImpl&amp;lt;CCrank, &amp;amp;CLSID_Crank, ICrank, &amp;amp;IID_ICrank, &amp;amp;LIBID_AsdkSliderCrankDbLib&amp;gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;public&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; IOPMPropertyExtensionImpl&amp;lt;CCrank&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;Also make sure that the inherted templates are properly mapped like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;BEGIN_COM_MAP(CCrank)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(ICrank)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IDispatch)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(ISupportErrorInfo)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IConnectionPointContainer)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IRetrieveApplication)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IAcadSubEntity)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IAcadBaseSubEntity)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;COM_INTERFACE_ENTRY(IOPMPropertyExtension)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;END_COM_MAP()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;Finally, implement the GetResourceInstance and GetDisplayName methods of the IOpmPropertyExtension/IOpmPropertyExtensionImpl interfaces like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;virtual&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; HINSTANCE GetResourceInstance()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;HINSTANCE hi = _AtlBaseModule.GetResourceInstance(); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;HINSTANCE dllHi = _hdllInstance;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; hi;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;STDMETHODIMP GetDisplayName(&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;DISPID dispID,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;BSTR *pBstr)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; (dispID == 0x401) { &lt;SPAN style="color: green;"&gt;// magic dispID meaning object itself&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; (pBstr==NULL)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; E_POINTER;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;*pBstr = ::SysAllocString(L&lt;SPAN style="color: #a31515;"&gt;"TheCrank"&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; S_OK; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10pt;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; IOPMPropertyExtensionImpl&amp;lt;CCrank&amp;gt;::GetDisplayName(&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;dispID, pBstr);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;The proper implementation of GetDisplayName method is vital for the subentity OPM to work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 8pt;"&gt;I am attaching the sample with these modifications to the Crank subentity. Similar modifications need to be made to the other sub entities as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 06:58:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3623480#M14334</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2012-09-18T06:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to display sub-entity's properties in Property Palette?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3623600#M14335</link>
      <description>&lt;P&gt;Your&amp;nbsp;code has resolved my question.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;Thanks&lt;/FONT&gt; a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 08:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-display-sub-entity-s-properties-in-property-palette/m-p/3623600#M14335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-18T08:59:41Z</dc:date>
    </item>
  </channel>
</rss>

