<?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 COM Properties: &amp;quot;Standard&amp;quot; Properties - how to make them work? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/com-properties-quot-standard-quot-properties-how-to-make-them/m-p/12662738#M956</link>
    <description>&lt;P&gt;My custom object has a extra set of standard properties (line colour, layer, linetype and lineweight) that I'm trying to expose in the COM properties panel. I can only get it to partially work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// IDL
[propget, id(DISPID_IENT_WTLAYER), helpstring("Layer")] HRESULT WTLayer([out, retval] ACAD_LAYER* pVal);
[propget, id(DISPID_IENT_WTCOLOR), helpstring("Color")] HRESULT WTColor([out, retval] IAcadAcCmColor** pVal);
[propget, id(DISPID_IENT_WTLT), helpstring("Linetype")] HRESULT WTLinetype([out, retval] ACAD_LTYPE* pVal);
[propget, id(DISPID_IENT_WTLW), helpstring("Lineweight")] HRESULT WTLineweight([out, retval] ACAD_LWEIGHT* pVal);

// .H / .CPP
STDMETHOD(get_WTLayer)(/*[out, retval]*/ ACAD_LAYER* pVal);
STDMETHOD(get_WTColor)(/*[out, retval]*/ IAcadAcCmColor** pVal);
STDMETHOD(get_WTLinetype)(/*[out, retval]*/ ACAD_LTYPE* pVal);
STDMETHOD(get_WTLineweight)(/*[out, retval]*/ ACAD_LWEIGHT* pVal);&lt;/LI-CODE&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;UL&gt;&lt;LI&gt;The colour property works, in that I get into the handler, but I don't understand how to assign my colour to the argument. &lt;STRONG&gt;Anyone know how to do this?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;I get into the layer property handler, assign the string, but nothing appears in the panel&lt;/LI&gt;&lt;LI&gt;The lineweight handler works as expect and displays correctly.&lt;/LI&gt;&lt;LI&gt;I never hit the linetype handler and as such, nothing is displayed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now I can change the types for the layer and linetype to BSTR, which works, but if I ever make my properties not read-only, I'd want to use the standard linetype picker, and this approach stops that from working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TLDR: What is the proper way to expose 'standard' properties, with the appropriate picker controls, in the COM property panel?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 02:04:17 GMT</pubDate>
    <dc:creator>Kyudos</dc:creator>
    <dc:date>2024-03-25T02:04:17Z</dc:date>
    <item>
      <title>COM Properties: "Standard" Properties - how to make them work?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-properties-quot-standard-quot-properties-how-to-make-them/m-p/12662738#M956</link>
      <description>&lt;P&gt;My custom object has a extra set of standard properties (line colour, layer, linetype and lineweight) that I'm trying to expose in the COM properties panel. I can only get it to partially work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// IDL
[propget, id(DISPID_IENT_WTLAYER), helpstring("Layer")] HRESULT WTLayer([out, retval] ACAD_LAYER* pVal);
[propget, id(DISPID_IENT_WTCOLOR), helpstring("Color")] HRESULT WTColor([out, retval] IAcadAcCmColor** pVal);
[propget, id(DISPID_IENT_WTLT), helpstring("Linetype")] HRESULT WTLinetype([out, retval] ACAD_LTYPE* pVal);
[propget, id(DISPID_IENT_WTLW), helpstring("Lineweight")] HRESULT WTLineweight([out, retval] ACAD_LWEIGHT* pVal);

// .H / .CPP
STDMETHOD(get_WTLayer)(/*[out, retval]*/ ACAD_LAYER* pVal);
STDMETHOD(get_WTColor)(/*[out, retval]*/ IAcadAcCmColor** pVal);
STDMETHOD(get_WTLinetype)(/*[out, retval]*/ ACAD_LTYPE* pVal);
STDMETHOD(get_WTLineweight)(/*[out, retval]*/ ACAD_LWEIGHT* pVal);&lt;/LI-CODE&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;UL&gt;&lt;LI&gt;The colour property works, in that I get into the handler, but I don't understand how to assign my colour to the argument. &lt;STRONG&gt;Anyone know how to do this?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;I get into the layer property handler, assign the string, but nothing appears in the panel&lt;/LI&gt;&lt;LI&gt;The lineweight handler works as expect and displays correctly.&lt;/LI&gt;&lt;LI&gt;I never hit the linetype handler and as such, nothing is displayed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now I can change the types for the layer and linetype to BSTR, which works, but if I ever make my properties not read-only, I'd want to use the standard linetype picker, and this approach stops that from working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TLDR: What is the proper way to expose 'standard' properties, with the appropriate picker controls, in the COM property panel?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 02:04:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-properties-quot-standard-quot-properties-how-to-make-them/m-p/12662738#M956</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2024-03-25T02:04:17Z</dc:date>
    </item>
  </channel>
</rss>

