Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisps "Select Hatch Patterns which Scale/ Angle will be equal ..."

7 REPLIES 7
Reply
Message 1 of 8
damian.wrobel
440 Views, 7 Replies

Lisps "Select Hatch Patterns which Scale/ Angle will be equal ..."

Hi there, recently I tried to write a Lisp which asks "Select Hatch Patterns which Scale will be equal ...", and a Lisp which asks "Select Hatch Patterns which Angle will be equal ...", but both of them fail to work properly. Here they are: (DEFUN C:HH2 () (princ "\n Select Hatch Patterns which Scale will be equal 2") (COMMAND "_-HATCHEDIT" "Properties" " " "1" ; SCALE " " ; ANGLE )) and (DEFUN C:HJJ () (princ "\n Select Hatch Patterns which Angle will be equal 0") (COMMAND "_-HATCHEDIT" "Properties" " " " " ; SCALE "0" ; ANGLE )) What is bad? Why they don't work properly? What should I improve? Please, help.
7 REPLIES 7
Message 2 of 8

Of course - I don't know, why - my original design of Lisp was automatically changed by publishing of post 😞 So, I write the Lisps once more: (DEFUN C:HH2 () (princ "\n Select Hatch Patterns which Scale will be equal 2") (COMMAND "_-HATCHEDIT" "Properties" " " "1" ; SCALE " " ; ANGLE )) and (DEFUN C:HJJ () (princ "\n Select Hatch Patterns which Angle will be equal 0") (COMMAND "_-HATCHEDIT" "Properties" " " " " ; SCALE "0" ; ANGLE ))
Message 3 of 8

Haha I knew, that it could happen... I made a screenshot. On this screenshot you see, how my lisps look like. And here is this screenshot:
Message 4 of 8

 
Message 5 of 8

What is going on? I click on "Add Attachment" and choose an image, and than click "Post", but after that, there is no image. Why?
Message 6 of 8

Hi there, recently I tried to write a Lisp which asks "Select Hatch Patterns which Scale will be equal ...", and a Lisp which asks "Select Hatch Patterns which Angle will be equal ...", but both of them fail to work properly. Here they are: (DEFUN C:HH2 () (princ "\n Select Hatch Patterns which Scale will be equal 2") (COMMAND "_-HATCHEDIT" "Properties" " " "1" ; SCALE " " ; ANGLE )) and (DEFUN C:HJJ () (princ "\n Select Hatch Patterns which Angle will be equal 0") (COMMAND "_-HATCHEDIT" "Properties" " " " " ; SCALE "0" ; ANGLE )) What is bad? Why they don't work properly? What should I improve? Please, help.
Message 7 of 8

I tried once more, but after clicking on "Post", the shape of my post was changed 😞 So i uploaded an image on speedyshare just make you able to watch, how my Lisp looks like. Here it is: http://www.speedyshare.com/xt2v8/autocad-lisp.png
Message 8 of 8

My problem with posting on this forum is solved. I just should use Google Chrome, where I can get the "Options" shown, instead of Mozilla Firefox.

http://forums.autodesk.com/t5/autocad-2010-2011-2012/why-instead-of-hpang-a-number-between-0-and-1-i...

 

 

So, my lisps from the first post are:

 

DEFUN C:HH2 () 
 (princ "\n Select Hatch Patterns which Scale will be equal 1") 
 (COMMAND "_-HATCHEDIT" "Properties" " " 
  "1" ; SCALE 
  ""  ; ANGLE 
 )
) 

 and 

(DEFUN C:HJJ () 
 (princ "\n Select Hatch Patterns which Angle will be equal 0") 
 (COMMAND "_-HATCHEDIT" "Properties" " " 
  " " ; SCALE 
  "0" ; ANGLE
 )
) 

 

 

And now I solved this problem in this way:

 

(DEFUN C:HSCC2 ()
 (princ "\nSelect HatchPatterns to change their HatchScale to 2")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "2" "")
)

 

and

 

(DEFUN C:HNGGH ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 0")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "0")
) 

(DEFUN C:HNGGT ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 90")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "90")
) 

(DEFUN C:HNGGF ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 180")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "180") ) 

(DEFUN C:HNGGB ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 270")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "270")
)

; ---
(DEFUN C:HNGGY ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 45")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "45")
)

(DEFUN C:HNGGR ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 135")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "135")
)

(DEFUN C:HNGGV  ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 225")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "225")
) 

(DEFUN C:HNGGN ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 315")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "315")
) 

; ---
(DEFUN C:HNGGHY ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 30")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "30")
) 

(DEFUN C:HNGGYT ()
 (princ "\nSelect HatchPatterns to change their HatchAngle to 60")
 (setq zbior (ssget))
 (COMMAND "_-HATCHEDIT" zbior "_Properties" "" "" "60")
) 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost