<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>[CONNECT C++] mdlElementTemplate_getElementParam() replacement</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/208547/connect-c-mdlelementtemplate_getelementparam-replacement</link><description>Hi, I have V8i MDL code using 
 mdlElementTemplate_getElementParam() and 
 mdlElementTemplate_getNumElementParams() 
 Looking for a replacement of these functions, I searched the Connect 10 Update 14 SDK and found: 
 ElementTemplateParamsHelper::GetEntryCount</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [CONNECT C++] mdlElementTemplate_getElementParam() replacement</title><link>https://communities.bentley.com/thread/630097?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 11:41:35 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0d5a403b-f075-424a-8b88-ce2251492a86</guid><dc:creator>Tom Torell</dc:creator><description>&lt;p&gt;Hi Jan,&lt;br /&gt;&lt;br /&gt;thank you, this was the information I was looking for.&lt;br /&gt;&lt;br /&gt;Now I&amp;#39;m able to migrate and compile my code for Connect. Till yet I can&amp;#39;t confirm if this is working correctly at runtime; I will confirm this later, when I tested my application.&lt;br /&gt;&lt;br /&gt;The solution is quite simple, if you know what to do, so I share my example code snippet here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;Mstn\MdlApi\MdlApi.h&amp;gt;

DGNPLATFORM_TYPEDEFS(TemplateSymbologyRemapper)
#include &amp;lt;Mstn\XDataTree\MstnElementTemplate.h&amp;gt;

{
    MstnElementTemplateMgrStatus stat;
    ElementTemplateNodePtr pElementTemplate = NULL;
    ECN::IECInstancePtr etPropertyInstance;
    UInt32 uiCntParam = 0;
    UInt32 uiColor = 0;

    stat = MstnElementTemplateMgr::CreateFromExisting(pElementTemplate, szTemplatePath);
    if (stat != MSTNELEMENTTEMPLATE_STATUS_SUCCESS) { ; // Error Handling ... }

    etPropertyInstance = pElementTemplate-&amp;gt;GetOrCreateDefaultInstance();

    stat = ElementTemplateParamsHelper::GetEntryCount(uiCntParam, *etPropertyInstance, ElementParameterType::ELEMENTPARAM_Color);
    if (stat != MSTNELEMENTTEMPLATE_STATUS_SUCCESS)  { ; // Error Handling ... }

    stat = ElementTemplateParamsHelper::GetElementColor(uiColor, ACTIVEMODEL, *etPropertyInstance);
    if (stat != MSTNELEMENTTEMPLATE_STATUS_SUCCESS)  { ; // Error Handling ... }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Tom&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT C++] mdlElementTemplate_getElementParam() replacement</title><link>https://communities.bentley.com/thread/629926?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 17:34:35 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:02fd8697-0347-41a4-8330-15d29c9104af</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Tom,&lt;/p&gt;
&lt;p&gt;I guess information in &lt;strong&gt;ElementTemplateNode Struct Reference&lt;/strong&gt; chapter in SDK documentation can help you. There are code snippets available for CRUD operations with element templates.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>