<?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/5474597#M343068</link>
    <description>Thank you, Kent1Cooper! I corrected my lisps. Here they are: (DEFUN C:HSCNG (/ CurHSC CurHANG) (setq CurHSC (getreal "\nSet Current HatchScale for: ")) (setq CurHANG (getreal "\nSet Current HatchAngle for: ")) (COMMAND "HPSCALE" CurHSC ) (COMMAND "HPANG" CurHANG) ) ; ---- (DEFUN C:HSCNGDEF (/) (princ "\nSet current HatchScale for 1, and current HatchAngle for 0") (COMMAND "HPSCALE" "1") (COMMAND "HPANG" "0") ) ; ----------- (DEFUN C:HSCCNGG (/) (princ "\nChoose HatchPatterns to change HatchScale for HatchScale you setted") (princ "\nand to change HatchAngle for HatchAngle you setted: ") (setq zbior (ssget)) (COMMAND "_-HATCHEDIT" zbior "Properties" "") ) ; ---- (DEFUN C:HSCCNGG1 (/ HSC HANG) (setq HSC (getreal "\nEnter value for HatchScale: ")) (setq HANG (getreal "\nEnter value for HatchAngle: ")) (princ "\nChoose HatchPatterns to change HatchScale for HatchScale you setted") (princ "\nand to change HatchAngle for HatchAngle you setted: ") (setq zbior (ssget)) (COMMAND "_-HATCHEDIT" zbior "Properties" "" HSC HANG ) ) ; ---- ; DEF = DEFault (DEFUN C:HSCCNGGDEF (/) (princ "\nChoose HatchPatterns to change HatchScale for 1") (princ "\nand to change HatchScale for 0") (setq zbior (ssget)) (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; (defun Radians-&amp;gt;Degrees (numberOfRadians) (* 180.0 (/ numberOfRadians pi)) ) (setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG"))) ; CurHANG = Current Hatch ANGle ;;;; (setq CurHSC (getvar "HPSCALE")) ; CurHSC = Current Hatch SCale (setq zbior (ssget)) (princ "\nSelect Hatch Patterns to change their HatchScale for the Current HatchScale") (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: ") (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; (defun Radians-&amp;gt;Degrees (numberOfRadians) (* 180.0 (/ numberOfRadians pi)) ) (setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG"))) ;;;; (setq zbior (ssget)) (princ "\nSelect Hatch Patterns to change their HatchAngle for the Current HatchAngle: ") (COMMAND "_-HATCHEDIT" zbior "Properties" "" "" CurHANG) ) ;----------- (DEFUN C:HSCINF (/) (princ "\nCurrent HatchScale is equal to: ") (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; (defun Radians-&amp;gt;Degrees (numberOfRadians) (* 180.0 (/ numberOfRadians pi)) ) (setq CurHANG (Radians-&amp;gt;Degrees (getvar "HPANG"))) ;;;; (princ "\nCurrent HatchAngle is equal to: ") CurHANG ) ; CURHANG = CURrent Hatch ANGle ; ----</description>
    <pubDate>Mon, 19 Jan 2015 15:35:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-19T15:35:49Z</dc:date>
  </channel>
</rss>

