<?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: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates. in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668359#M4858</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14420845"&gt;@prem_kumar8SXZJ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, How do I check If I am in WCS or the view is not parallel to the XY plane?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can check if the current view direction is parallel to Vector3d.ZAxis.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;public static bool IsCurrentViewPerpendicularToXYPlane()
{
    var ed = Application.DocumentManager.MdiActiveDocument.Editor;
    using (var view = ed.GetCurrentView())
    {
        return view.ViewDirection.IsParallelTo(Vector3d.ZAxis);
    }
}&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 27 Mar 2024 06:36:49 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2024-03-27T06:36:49Z</dc:date>
    <item>
      <title>Getting value of Z Coordinates 0 when working with YZ or XZ Plane.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12666632#M4855</link>
      <description>&lt;P&gt;Hi When I try to get the Coordinates of my mouse in AutoCAD sometimes I get Z coordinates and sometimes I get Z coordinates as 0. Is there any way to solve this bug? I am not using any code, It is just happening by default in AutoCAD behavior.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 08:16:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12666632#M4855</guid>
      <dc:creator>prem_kumar8SXZJ</dc:creator>
      <dc:date>2024-03-27T08:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12667779#M4856</link>
      <description>&lt;P&gt;Your screenshots suggest that you're not in the WCS or the view is not parallel to the WCS XY plane.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 23:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12667779#M4856</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2024-03-26T23:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668237#M4857</link>
      <description>&lt;P&gt;Hi, How do I check If I am in WCS or the view is not parallel to the XY plane?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 05:32:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668237#M4857</guid>
      <dc:creator>prem_kumar8SXZJ</dc:creator>
      <dc:date>2024-03-27T05:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668359#M4858</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14420845"&gt;@prem_kumar8SXZJ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, How do I check If I am in WCS or the view is not parallel to the XY plane?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can check if the current view direction is parallel to Vector3d.ZAxis.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;public static bool IsCurrentViewPerpendicularToXYPlane()
{
    var ed = Application.DocumentManager.MdiActiveDocument.Editor;
    using (var view = ed.GetCurrentView())
    {
        return view.ViewDirection.IsParallelTo(Vector3d.ZAxis);
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Mar 2024 06:36:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668359#M4858</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-03-27T06:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668518#M4859</link>
      <description>&lt;P&gt;Similar to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;'s solution, this will tell you if the current view is a plan view of the current UCS:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public static partial class EditorExtensions
{
   public static bool IsPlanUCS(this Editor editor)
   {
      if(editor == null) 
         throw new ArgumentNullException(nameof(editor));
      return editor.GetCurrentView().ViewDirection.IsParallelTo(
         editor.CurrentUserCoordinateSystem.CoordinateSystem3d.Zaxis);
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 08:11:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668518#M4859</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2024-03-27T08:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting value of Z Coordinates 0 when working with YZ or XZ Coordinates.</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668544#M4860</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;I think I haven't described my problem correctly so I have made one small video for Your reference. When I am working on the Top view which is the XY plane I am getting the coordinates of XY correctly but when I change my view to Left which is the YZ plane then at a certain point I am getting the value of X and Y coordinates only and after a certain point I started to get the value of Z Coordinates. Why this behavior is happening?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 08:31:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-value-of-z-coordinates-0-when-working-with-yz-or-xz/m-p/12668544#M4860</guid>
      <dc:creator>prem_kumar8SXZJ</dc:creator>
      <dc:date>2024-03-27T08:31:40Z</dc:date>
    </item>
  </channel>
</rss>

