<?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: Resetting Z Point coordinates in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460447#M6348</link>
    <description>&lt;P&gt;I added the class here. In the file I added below, it resets the Z value of only Circle objects. Other Line objects do not reset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* I tried it in text and points. They also reset. OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Dec 2023 15:14:43 GMT</pubDate>
    <dc:creator>k005</dc:creator>
    <dc:date>2023-12-24T15:14:43Z</dc:date>
    <item>
      <title>Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12432661#M6335</link>
      <description>&lt;P&gt;Hello friends;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to set the Z values ​​of all objects in the drawing to 0. But I think there is an error somewhere in this code. It does not give 0 to Z values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance to the helpful friend.&lt;/P&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;LI-CODE lang="csharp"&gt; private void btnMesleki_Click(object sender, EventArgs e)
        {
            this.Close();
                // Aktif belgeyi al
            Aapp.Document doc = aCap.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            // Kullanıcıdan nesneleri seçmesini iste
            PromptSelectionResult selRes = ed.GetSelection();
            if (selRes.Status != PromptStatus.OK)
            {
                ed.WriteMessage("Seçim iptal edildi veya hatalı.");
                return;
            }

            // Seçilen nesneleri al
            using (Transaction trans = db.TransactionManager.StartTransaction())
            using (Aapp.DocumentLock docLock = Adoc.LockDocument())
            {
                SelectionSet selSet = selRes.Value;
                foreach (ObjectId objId in selSet.GetObjectIds())
                {
                    Entity ent = trans.GetObject(objId, Adb.OpenMode.ForWrite) as Entity;

                    if (ent != null)
                    {
                        // Z koordinatını sıfırla
                        ent.TransformBy(Matrix3d.Displacement(new Vector3d(0, 0, -ent.GeometricExtents.MinPoint.Z)));
                    }
                }

                // İşlemleri tamamla
                trans.Commit();
            }

            // Ekrana yazı bas
            ed.WriteMessage("Seçilen nesnelerin Z koordinatları sıfırlandı.");
        }
    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 09:59:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12432661#M6335</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-11T09:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12446361#M6336</link>
      <description>&lt;P&gt;See &lt;A href="https://forums.autodesk.com/t5/net/entity-coordinates/m-p/12380458/highlight/true#M79417" target="_blank" rel="noopener"&gt;this post&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 10:39:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12446361#M6336</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2023-12-17T10:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12453150#M6337</link>
      <description>&lt;P&gt;How do we integrate it into the code I gave above?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 12:26:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12453150#M6337</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-20T12:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12453630#M6338</link>
      <description>&lt;P&gt;It is an extension method. You just add it to your code file and then call it like it was a method of the Entity class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;lt;snip&amp;gt;
Entity ent = trans.GetObject(objId, Adb.OpenMode.ForWrite) as Entity;

if (ent != null)
{
   // Z koordinatini sifirla
   ent.TranslateToXYPlane();
}

&amp;lt;snip&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 16:00:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12453630#M6338</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2023-12-20T16:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12455067#M6339</link>
      <description>&lt;P&gt;It's busy... I'll try. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 05:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12455067#M6339</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-21T05:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456394#M6340</link>
      <description>&lt;P&gt;Cannot be accessed due to protection level. I'm getting the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-12-21_204944.png" style="width: 631px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1307166i9854E61145BA365B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-12-21_204944.png" alt="2023-12-21_204944.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 17:52:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456394#M6340</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-21T17:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456424#M6341</link>
      <description>&lt;P&gt;AcRx means Autodesk.AutoCAD.Runtime&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 18:05:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456424#M6341</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2023-12-21T18:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456483#M6342</link>
      <description>&lt;P&gt;Ok. Solution?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 18:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456483#M6342</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-21T18:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456511#M6343</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537692"&gt;@k005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The immediate solution is attached.&lt;BR /&gt;The long term solution is to study.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-12-22_07-48-23.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1307186iC8E862550B78C6D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-12-22_07-48-23.png" alt="2023-12-22_07-48-23.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-12-22_07-54-45.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1307189iA32E809F17845193/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-12-22_07-54-45.png" alt="2023-12-22_07-54-45.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 18:55:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12456511#M6343</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-12-21T18:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459226#M6344</link>
      <description>&lt;P&gt;Thank you. I didn't notice...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* Isn't there a much shorter ready-made code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will only give zero value to the Z points of 2D objects. will reset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 10:23:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459226#M6344</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-23T10:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459690#M6345</link>
      <description>&lt;P&gt;Perhaps have a look at this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/setting-z-value-to-0-in-all-objects-in-a-drawing/m-p/11685654/highlight/true#M75517" target="_blank"&gt;https://forums.autodesk.com/t5/net/setting-z-value-to-0-in-all-objects-in-a-drawing/m-p/11685654/highlight/true#M75517&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;added:&lt;/P&gt;&lt;P&gt;You really need to provide more information about your problems.&lt;/P&gt;&lt;P&gt;happy new year&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 21:03:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459690#M6345</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-12-23T21:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459934#M6346</link>
      <description>&lt;P&gt;The code that I posted will only move objects so that the bottom of their bounding box is in the XY plane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That makes the assumption that they are 2 dimensional objects that are parallel to the XY plane. If that's not the case then you need to be more specific about exactly what it is you are trying to do and what types of objects you are dealing with.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 02:55:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12459934#M6346</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2023-12-24T02:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460413#M6347</link>
      <description>&lt;P&gt;What I want to do is to set the Z point value of objects such as Line, polyline, circle, mline, Text, Mtext to zero. If it's already zero, it won't do anything.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for example a Line object. 500 units and at an angle of 14 degrees. &lt;STRONG&gt;Z1&lt;/STRONG&gt;: &lt;STRONG&gt;18&lt;/STRONG&gt; ,&lt;STRONG&gt;Z2&lt;/STRONG&gt;: &lt;STRONG&gt;35&lt;/STRONG&gt; change it to &lt;STRONG&gt;Z1&lt;/STRONG&gt;: &lt;STRONG&gt;0&lt;/STRONG&gt; , &lt;STRONG&gt;Z2&lt;/STRONG&gt;: &lt;STRONG&gt;0&lt;/STRONG&gt;...&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 14:19:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460413#M6347</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-24T14:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460447#M6348</link>
      <description>&lt;P&gt;I added the class here. In the file I added below, it resets the Z value of only Circle objects. Other Line objects do not reset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* I tried it in text and points. They also reset. OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 15:14:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460447#M6348</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-24T15:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460457#M6349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;For curves that aren't parallel to the XY plane, you can try the &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Curve_GetOrthoProjectedCurve_Plane" target="_blank" rel="noopener"&gt;Curve.GetOrthoProjectedCurve&lt;/A&gt; method.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 15:28:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12460457#M6349</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-12-24T15:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting Z Point coordinates</title>
      <link>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12461201#M6350</link>
      <description>&lt;P&gt;OK, let me investigate. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 09:18:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/resetting-z-point-coordinates/m-p/12461201#M6350</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2023-12-25T09:18:51Z</dc:date>
    </item>
  </channel>
</rss>

