<?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: Why instead of HPANG, a number between 0 and 1 is loaded? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/why-instead-of-hpang-a-number-between-0-and-1-is-loaded/m-p/5474992#M343069</link>
    <description>&lt;P&gt;Now I use Google Chrome and when I click on "Options", the menu is shown &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Before I used Mozilla Firefox and probably it has an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are my lisps from previous post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(DEFUN C:HSCNG (/ CurHSC CurHANG)
&amp;nbsp;(setq CurHSC (getreal "\nSet Current HatchScale for: "))
&amp;nbsp;(setq CurHANG (getreal "\nSet Current HatchAngle for: "))
&amp;nbsp;(COMMAND "HPSCALE" CurHSC )
&amp;nbsp;(COMMAND "HPANG" CurHANG)
)

; ----

(DEFUN C:HSCNGDEF (/)
&amp;nbsp;(princ "\nSet current HatchScale for 1, and current HatchAngle for 0")
&amp;nbsp;(COMMAND "HPSCALE" "1")
&amp;nbsp;(COMMAND "HPANG" "0")
)

; -----------

(DEFUN C:HSCCNGG (/)
&amp;nbsp;(princ "\nChoose HatchPatterns to change HatchScale for HatchScale you setted")
&amp;nbsp;(princ "\nand to change HatchAngle for HatchAngle you setted: ")
&amp;nbsp;(setq zbior (ssget))
&amp;nbsp;(COMMAND "_-HATCHEDIT" zbior "Properties" "")
)

; ----

(DEFUN C:HSCCNGG1 (/ HSC HANG)
&amp;nbsp;(setq HSC (getreal "\nEnter value for HatchScale: "))
&amp;nbsp;(setq HANG (getreal "\nEnter value for HatchAngle: "))
&amp;nbsp;(princ "\nChoose HatchPatterns to change HatchScale for HatchScale you setted")
&amp;nbsp;(princ "\nand to change HatchAngle for HatchAngle you setted: ")
&amp;nbsp;(setq zbior (ssget))
&amp;nbsp;(COMMAND "_-HATCHEDIT" zbior "Properties" "" HSC HANG )
)

; ----

; DEF = DEFault
(DEFUN C:HSCCNGGDEF (/)
&amp;nbsp;(princ "\nChoose HatchPatterns to change HatchScale for 1")
&amp;nbsp;(princ "\nand to change HatchScale for 0")
&amp;nbsp;(setq zbior (ssget))
&amp;nbsp;(COMMAND "_-HATCHEDIT" zbior "Properties" "" "1" "0" )
)

; ----

(DEFUN C:HSCCNGGCUR (/ Radians-&amp;gt;Degrees CurHSC CurHANG)

;;;;

; Default, Autocad works on HatchAngle in Radians.
; In purpose to tell to Autocad, that it should give me HatchAngle in Degrees,
; not in Radians, this "Radians-&amp;gt;Degrees" function is needed;

&amp;nbsp;(defun Radians-&amp;gt;Degrees (numberOfRadians)
&amp;nbsp;(* 180.0 (/ numberOfRadians pi))
&amp;nbsp;)

&amp;nbsp;(setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG"))) ; CurHANG = Current Hatch ANGle

;;;;

&amp;nbsp;(setq CurHSC (getvar "HPSCALE")) ; CurHSC = Current Hatch SCale
&amp;nbsp;(setq zbior (ssget))

&amp;nbsp;(princ "\nSelect Hatch Patterns to change their HatchScale for the Current HatchScale")
&amp;nbsp;(princ "\nand to change their HatchAngle for the Current HatchAngle: ")

; (princ "\nWybierz Hatch'e do zmiany HatchScale na bieżącą")
; (princ "\noraz do zmiany HatchAngle na bieżący: ")

&amp;nbsp;(COMMAND "_-HATCHEDIT" zbior "Properties" "" CurHSC CurHANG)
)

;-----------

(DEFUN C:HNGGCUR (/ Radians-&amp;gt;Degrees CurHANG)

;;;;

; Default, Autocad works on HatchAngle in Radians.
; In purpose to tell to Autocad, that it should give me HatchAngle in Degrees,
; not in Radians, this "Radians-&amp;gt;Degrees" function is needed;

&amp;nbsp;(defun Radians-&amp;gt;Degrees (numberOfRadians)
&amp;nbsp;(* 180.0 (/ numberOfRadians pi))
&amp;nbsp;)

&amp;nbsp;(setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG")))

;;;;

&amp;nbsp;(setq zbior (ssget))
&amp;nbsp;(princ "\nSelect Hatch Patterns to change their HatchAngle for the Current HatchAngle: ")
&amp;nbsp;(COMMAND "_-HATCHEDIT" zbior "Properties" "" "" CurHANG)
)

;-----------

(DEFUN C:HSCINF (/)
&amp;nbsp;(princ "\nCurrent HatchScale is equal to: ")
&amp;nbsp;(getvar "HPSCALE")
)

;-----

;Działa
; RADTODEG = RADians TO DEGrees
; HNGINFRADTODEG

(DEFUN C:HNGINF (/ Radians-&amp;gt;Degrees CurHANG)

;;;;

; Default, Autocad works on HatchAngle in Radians.
; In purpose to tell to Autocad, that it should give me HatchAngle in Degrees,
; not in Radians, this "Radians-&amp;gt;Degrees" function is needed;

&amp;nbsp;(defun Radians-&amp;gt;Degrees (numberOfRadians)
&amp;nbsp;(* 180.0 (/ numberOfRadians pi))
&amp;nbsp;)

&amp;nbsp;(setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG")))

;;;;

&amp;nbsp;(princ "\nCurrent HatchAngle is equal to: ")
&amp;nbsp;CurHANG
)
; CURHANG = CURrent Hatch ANGle

; ----&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for help.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jan 2015 21:11:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-19T21:11:03Z</dc:date>
  </channel>
</rss>

