<?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: Dynamic Block with Parametric constraints update geometry within command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747929#M10007</link>
    <description>&lt;P&gt;Thank you for your suggestion, it is what I am doing currently.&lt;/P&gt;&lt;P&gt;I started first with an encompassing transaction, but after I encountered this problem, I changed my code to passing ObjectIds around and creating transaction in each method.&lt;/P&gt;&lt;P&gt;So I place the block in one transaction, commit it, then in the next method, which should operate on the updated geometry, open a new transaction, but the block (also visually) remains as in blockeditor until I exit the command.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Feb 2023 19:34:10 GMT</pubDate>
    <dc:creator>MGO-Norsyn</dc:creator>
    <dc:date>2023-02-11T19:34:10Z</dc:date>
    <item>
      <title>Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747831#M10005</link>
      <description>&lt;P&gt;I am placing a dynamic block with parametric constraints and setting some values by code which in turn should modify the block dimensions. I am using these geometric dimensions in later code to modify some other geometry.&lt;/P&gt;&lt;P&gt;The problem is that the block does not update until I exit the command. I have searched everywhere and apparently one should call AnonymousBlockTableRecord abtr.UpdateAnonymousBlocks and set the current document doc.TransactionManager.QueueForGraphicsFlush();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this doesn't work. Please help me force Autocad to update this dynamic block, so I can read it's new geometry and act upon it without exiting the command.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 17:58:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747831#M10005</guid>
      <dc:creator>MGO-Norsyn</dc:creator>
      <dc:date>2023-02-11T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747894#M10006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;What if you commit and close the transaction after having edited the block and start a new one to re-open the block for read ?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 18:49:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747894#M10006</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-02-11T18:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747929#M10007</link>
      <description>&lt;P&gt;Thank you for your suggestion, it is what I am doing currently.&lt;/P&gt;&lt;P&gt;I started first with an encompassing transaction, but after I encountered this problem, I changed my code to passing ObjectIds around and creating transaction in each method.&lt;/P&gt;&lt;P&gt;So I place the block in one transaction, commit it, then in the next method, which should operate on the updated geometry, open a new transaction, but the block (also visually) remains as in blockeditor until I exit the command.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 19:34:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11747929#M10007</guid>
      <dc:creator>MGO-Norsyn</dc:creator>
      <dc:date>2023-02-11T19:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11748133#M10008</link>
      <description>&lt;P&gt;In &lt;A href="https://forums.autodesk.com/t5/net/update-dynamic-block-with-constraint-parameter-while-command-is/m-p/11747962/highlight/true#M75817" target="_blank" rel="noopener"&gt;another topic&lt;/A&gt;, you said: "I have a dynamic block with parametric constraint which calculates arc length based on radius and angle".&lt;/P&gt;
&lt;P&gt;You do not need a paramtric constraint to calculate the arc length based on radius and angle, simply multiply the angle (in radians) by the radius.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 22:51:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11748133#M10008</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-02-11T22:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11748714#M10009</link>
      <description>Thank you for this little detail. I was wrong in my description though, I am not finding the length of the arc, but rather the length of two tangents at both ends of the arc for pipe elbow cut length calculation. Anyway, I solved my problem from before by working around by calculating the needed geometry intersection points inside the code.&lt;BR /&gt;So the problem with geometric constraints not updating until command exit still persists.</description>
      <pubDate>Sun, 12 Feb 2023 11:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11748714#M10009</guid>
      <dc:creator>MGO-Norsyn</dc:creator>
      <dc:date>2023-02-12T11:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Block with Parametric constraints update geometry within command</title>
      <link>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11777196#M10010</link>
      <description>&lt;P&gt;I found a workaround for this problem. I have detailed it in this post: &lt;A href="https://forums.autodesk.com/t5/net/update-dynamic-block-with-constraint-parameter-while-command-is/m-p/11777185/highlight/true#M76018" target="_blank"&gt;https://forums.autodesk.com/t5/net/update-dynamic-block-with-constraint-parameter-while-command-is/m-p/11777185/highlight/true#M76018&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In short, call a command like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;editor.Command("-PAN", new Point3d(), new Point3d());&lt;/LI-CODE&gt;&lt;P&gt;This will force Autocad to update parametric geometry.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 20:55:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dynamic-block-with-parametric-constraints-update-geometry-within/m-p/11777196#M10010</guid>
      <dc:creator>MGO-Norsyn</dc:creator>
      <dc:date>2023-02-23T20:55:25Z</dc:date>
    </item>
  </channel>
</rss>

