<?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 set parameters for AcdbBlockReference? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9032483#M5159</link>
    <description>&lt;P&gt;You have to use &lt;FONT face="courier new,courier"&gt;class AcDbDynBlockReference&lt;/FONT&gt;. Construct an&amp;nbsp;&lt;FONT face="courier new,courier"&gt;AcDbDynBlockReference&lt;/FONT&gt; with the objectid of your BREF or with the BREF pointer itself. Then you can query the dynamic property and set them like this:&lt;/P&gt;
&lt;PRE style="font-family: Consolas; font-size: 16px; color: black; background: white;"&gt;&lt;SPAN style="color: gray;"&gt;#include&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #a31515;"&gt;&amp;lt;dbdynblk.h&amp;gt;&lt;/SPAN&gt;
 
&lt;SPAN style="color: #216f85;"&gt;Acad&lt;/SPAN&gt;::&lt;SPAN style="color: #216f85;"&gt;ErrorStatus&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;es&lt;/SPAN&gt;;
&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReference&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #880000;"&gt;dynBref&lt;/SPAN&gt;(brefID);
&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReferencePropertyArray&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;;
&lt;SPAN style="color: #880000;"&gt;dynBref&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;getBlockProperties&lt;/SPAN&gt;(&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;);
&lt;SPAN style="color: blue;"&gt;int&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN style="color: navy;"&gt;count&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;.&lt;SPAN style="color: navy;"&gt;length&lt;/SPAN&gt;();
&lt;SPAN style="color: blue;"&gt;for&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;count&lt;/SPAN&gt;;&amp;nbsp;++&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;)
{
	&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReferenceProperty&lt;/SPAN&gt;&amp;nbsp;&amp;amp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;[&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;];
	&lt;SPAN style="color: blue;"&gt;bool&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;bReadOnly&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: navy;"&gt;readOnly&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcString&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;strName&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;propertyName&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcString&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;strDescr&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;description&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcDbEvalVariant&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;value&lt;/SPAN&gt;(_your_value_);&amp;nbsp;&lt;SPAN style="color: green;"&gt;//&amp;nbsp;_your_value_&amp;nbsp;can&amp;nbsp;be&amp;nbsp;double,&amp;nbsp;short,&amp;nbsp;const&amp;nbsp;ACHAR*&amp;nbsp;...&lt;/SPAN&gt;
	&lt;SPAN style="color: navy;"&gt;es&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;setValue&lt;/SPAN&gt;(&lt;SPAN style="color: navy;"&gt;value&lt;/SPAN&gt;);
}
&lt;/PRE&gt;
&lt;P&gt;Keep in mind that AutoCAD will create a different AcDbBlockTableRecord and your BREF will point to this new BTR after you changed parameters.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2019 13:18:04 GMT</pubDate>
    <dc:creator>tbrammer</dc:creator>
    <dc:date>2019-09-18T13:18:04Z</dc:date>
    <item>
      <title>How to set parameters for AcdbBlockReference?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9029403#M5158</link>
      <description>Hello, Create a parameters Block, and How to set parameters for AcdbBlockReference?</description>
      <pubDate>Tue, 17 Sep 2019 09:38:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9029403#M5158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-17T09:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to set parameters for AcdbBlockReference?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9032483#M5159</link>
      <description>&lt;P&gt;You have to use &lt;FONT face="courier new,courier"&gt;class AcDbDynBlockReference&lt;/FONT&gt;. Construct an&amp;nbsp;&lt;FONT face="courier new,courier"&gt;AcDbDynBlockReference&lt;/FONT&gt; with the objectid of your BREF or with the BREF pointer itself. Then you can query the dynamic property and set them like this:&lt;/P&gt;
&lt;PRE style="font-family: Consolas; font-size: 16px; color: black; background: white;"&gt;&lt;SPAN style="color: gray;"&gt;#include&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #a31515;"&gt;&amp;lt;dbdynblk.h&amp;gt;&lt;/SPAN&gt;
 
&lt;SPAN style="color: #216f85;"&gt;Acad&lt;/SPAN&gt;::&lt;SPAN style="color: #216f85;"&gt;ErrorStatus&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;es&lt;/SPAN&gt;;
&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReference&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #880000;"&gt;dynBref&lt;/SPAN&gt;(brefID);
&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReferencePropertyArray&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;;
&lt;SPAN style="color: #880000;"&gt;dynBref&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;getBlockProperties&lt;/SPAN&gt;(&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;);
&lt;SPAN style="color: blue;"&gt;int&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN style="color: navy;"&gt;count&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;.&lt;SPAN style="color: navy;"&gt;length&lt;/SPAN&gt;();
&lt;SPAN style="color: blue;"&gt;for&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;count&lt;/SPAN&gt;;&amp;nbsp;++&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;)
{
	&lt;SPAN style="color: #216f85;"&gt;AcDbDynBlockReferenceProperty&lt;/SPAN&gt;&amp;nbsp;&amp;amp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: navy;"&gt;properties&lt;/SPAN&gt;[&lt;SPAN style="color: navy;"&gt;i&lt;/SPAN&gt;];
	&lt;SPAN style="color: blue;"&gt;bool&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;bReadOnly&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: navy;"&gt;readOnly&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcString&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;strName&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;propertyName&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcString&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;strDescr&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;description&lt;/SPAN&gt;();
	&lt;SPAN style="color: #216f85;"&gt;AcDbEvalVariant&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: navy;"&gt;value&lt;/SPAN&gt;(_your_value_);&amp;nbsp;&lt;SPAN style="color: green;"&gt;//&amp;nbsp;_your_value_&amp;nbsp;can&amp;nbsp;be&amp;nbsp;double,&amp;nbsp;short,&amp;nbsp;const&amp;nbsp;ACHAR*&amp;nbsp;...&lt;/SPAN&gt;
	&lt;SPAN style="color: navy;"&gt;es&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;property&lt;/SPAN&gt;.&lt;SPAN style="color: #880000;"&gt;setValue&lt;/SPAN&gt;(&lt;SPAN style="color: navy;"&gt;value&lt;/SPAN&gt;);
}
&lt;/PRE&gt;
&lt;P&gt;Keep in mind that AutoCAD will create a different AcDbBlockTableRecord and your BREF will point to this new BTR after you changed parameters.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 13:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9032483#M5159</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2019-09-18T13:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set parameters for AcdbBlockReference?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9036812#M5160</link>
      <description>&lt;P&gt;thanks, that's exactly what I want.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 08:59:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-set-parameters-for-acdbblockreference/m-p/9036812#M5160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-20T08:59:15Z</dc:date>
    </item>
  </channel>
</rss>

