<?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: Change Polyline3d in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4383377#M48609</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the help. Unfortunately this does not work. I remove tr.Dispose(), then i try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (tr)
{
  try
  {
  }
}
catch
{
}
finally
{
tr.Dispose();
}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;without success&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;is interesting, that the problem &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;comes&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;after the second&lt;/SPAN&gt; (and each next) &lt;SPAN class="hps"&gt;call to 3dorbit command. When I change polyline3d and then call to 3dorbit for the first time, everthing is fine. I&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;t is a little&lt;/SPAN&gt; bit &lt;SPAN class="hps"&gt;confusing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2013 09:50:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-28T09:50:49Z</dc:date>
    <item>
      <title>Change Polyline3d</title>
      <link>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4335891#M48607</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a program to change the polyline3d. Something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;try&lt;BR /&gt;{&lt;BR /&gt;  using (tr)&lt;BR /&gt;  {&lt;BR /&gt;    Polyline3d poly3d = (Polyline3d)tr.GetObject(oid, OpenMode.ForWrite);
    ObjectId[] verts = poly3d.Cast&amp;lt;ObjectId&amp;gt;().ToArray();

    for (int i = 0; i &amp;lt; verts.Length; i++)
    {
      vt = tr.GetObject(verts[i], OpenMode.ForWrite) as PolylineVertex3d;
      vt.Position = new Point3d(X, Y, Z);
    }&lt;BR /&gt;&lt;BR /&gt;    tr.Commit();&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;catch&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;tr.Dispose();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;After that, the polyline3d changes perfectly. On the screen i can see the change. But when i &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;run the command&lt;/SPAN&gt;&lt;/SPAN&gt; 3dorbit, then i see the polyline3d before the change.&lt;/P&gt;&lt;P&gt;You can see it on the &lt;A href="http://www.vedvo.com/polyline3d/" target="_self"&gt;Pictures&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When i save the drawing and open it again, everthing is &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;all right. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;Can anyone tell me&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;where the error is? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2013 12:44:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4335891#M48607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-19T12:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Change Polyline3d</title>
      <link>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4337028#M48608</link>
      <description>Remove:&lt;BR /&gt;tr.Dispose();&lt;BR /&gt;from your code,&lt;BR /&gt;me think it's a reason of your problem&lt;BR /&gt;you don't need todispose objects, within USING{} code block</description>
      <pubDate>Sat, 20 Jul 2013 17:41:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4337028#M48608</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-07-20T17:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Polyline3d</title>
      <link>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4383377#M48609</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the help. Unfortunately this does not work. I remove tr.Dispose(), then i try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (tr)
{
  try
  {
  }
}
catch
{
}
finally
{
tr.Dispose();
}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;without success&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;is interesting, that the problem &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;comes&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;after the second&lt;/SPAN&gt; (and each next) &lt;SPAN class="hps"&gt;call to 3dorbit command. When I change polyline3d and then call to 3dorbit for the first time, everthing is fine. I&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;t is a little&lt;/SPAN&gt; bit &lt;SPAN class="hps"&gt;confusing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 09:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4383377#M48609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-28T09:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change Polyline3d</title>
      <link>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4412179#M48610</link>
      <description>&lt;P&gt;We need to see the whole function in order to diagnose the prolem.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2013 18:26:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/change-polyline3d/m-p/4412179#M48610</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2013-09-09T18:26:16Z</dc:date>
    </item>
  </channel>
</rss>

