<?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: Get Variables set by Units command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435255#M36386</link>
    <description>&lt;P&gt;Thank you, but this is what I get when I set ANGBASE to 90, and ANGDIR to 1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 12.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/752491i04EFE79A22F8061A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image 12.png" alt="Image 12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This "Rotacija" property is my custom atribute that just reads rotation property from Block Reference entity and displays it in decimal value. It still shows value respect to AutoCAD's original angle direktion which is East. Seems like under the hood nothing changed.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Apr 2020 18:50:41 GMT</pubDate>
    <dc:creator>tamara</dc:creator>
    <dc:date>2020-04-10T18:50:41Z</dc:date>
    <item>
      <title>Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6270830#M36381</link>
      <description>&lt;P&gt;Hi, how can I get system variables ,in c#,set by Units command , how to know what variable is set ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bsr&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 13:51:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6270830#M36381</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-14T13:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6271416#M36382</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="3"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="georgia,palatino" size="3"&gt;This is an example of how to get the System Variable OSMODE.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("OSMODE");&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Apr 2016 17:36:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6271416#M36382</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2016-04-14T17:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6271435#M36383</link>
      <description>&lt;P&gt;You can get this values using the DataBase object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if you want to use the precision lenght:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Database db = HostApplicationServices.WorkingDatabase;
int precision = db.Luprec;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Apr 2016 17:42:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/6271435#M36383</guid>
      <dc:creator>phliberato</dc:creator>
      <dc:date>2016-04-14T17:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435063#M36384</link>
      <description>&lt;P&gt;&lt;U&gt;Hello,&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;do you know how to set the rest of the UNITS variables. Direction of base angle to be NORTH, and angle to be calculated CLOCKWISE, to be specific. Thank you.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Best regards,&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Tamara Popovic&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:11:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435063#M36384</guid>
      <dc:creator>tamara</dc:creator>
      <dc:date>2020-04-10T17:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435108#M36385</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-B7CAB5F3-16BC-4E06-97BC-AAAEC052727E-htm.html" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;ANGBASE&lt;/STRONG&gt;&lt;/A&gt; &amp;amp; &lt;A href="https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-A432574D-35B6-4D9E-8D8F-4259F2066234-htm.html" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;ANGDIR&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:40:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435108#M36385</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-04-10T17:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435255#M36386</link>
      <description>&lt;P&gt;Thank you, but this is what I get when I set ANGBASE to 90, and ANGDIR to 1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 12.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/752491i04EFE79A22F8061A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image 12.png" alt="Image 12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This "Rotacija" property is my custom atribute that just reads rotation property from Block Reference entity and displays it in decimal value. It still shows value respect to AutoCAD's original angle direktion which is East. Seems like under the hood nothing changed.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 18:50:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435255#M36386</guid>
      <dc:creator>tamara</dc:creator>
      <dc:date>2020-04-10T18:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435925#M36387</link>
      <description>&lt;P&gt;The &lt;A href="https://help.autodesk.com/view/OARX/2019/ENU/?guid=OREFNET-Autodesk_AutoCAD_DatabaseServices_BlockReference_Rotation" target="_blank" rel="noopener"&gt;&lt;STRONG&gt; BlockReference.Rotation&lt;/STRONG&gt;&lt;/A&gt; property is always measured in radians counterclockwise from the X axis of the block reference OCS (while the block reference normel is equal to Z Axis, the OCS is the same as WCS).&lt;/P&gt;
&lt;P&gt;You can convert the BlockReference.Rotation value to a clockwise positve decimal degrees value starting from north doing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;double degrees = (450.0 - blockReference.Rotation * 180.0 / System.Math.PI) % 360.0;&lt;/LI-CODE&gt;
&lt;P&gt;Another way, if the ANGBASE and ANGDIR sysvars are correctly set, is to use the &lt;A href="https://help.autodesk.com/view/OARX/2019/ENU/?guid=OREFNET-Autodesk_AutoCAD_Runtime_Converter_AngleToString_double" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Converter.AngleToString&lt;/STRONG&gt;&lt;/A&gt;() method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 05:57:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9435925#M36387</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-04-11T05:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Variables set by Units command</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9436297#M36388</link>
      <description>&lt;P&gt;Thank you very much. I was looking at the problem the wrong way trying to get the CAD behave like I want. Instead I have to adapt to it's behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tamara Popovic&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;</description>
      <pubDate>Sat, 11 Apr 2020 12:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-variables-set-by-units-command/m-p/9436297#M36388</guid>
      <dc:creator>tamara</dc:creator>
      <dc:date>2020-04-11T12:56:09Z</dc:date>
    </item>
  </channel>
</rss>

