Author Topic: vertial and horizin hatch lisp  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 291
vertial and horizin hatch lisp
« on: April 28, 2012, 11:15:31 PM »
hi freind
i am difficult in my work
that is hatch lisp
i want  200 * 400 size and other size   in  hatch line
i can't find  good lisp

can you help me some

ribarm

  • Gator
  • Posts: 3245
  • Marko Ribar, architect
Re: vertial and horizin hatch lisp
« Reply #1 on: April 29, 2012, 01:42:36 AM »
I've found this old HatchMaker.lsp... Try it and follow the instructions while executing... After hatch has been created go to command BH or HATCH and find your pattern under custom hatch patterns...

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3245
  • Marko Ribar, architect
Re: vertial and horizin hatch lisp
« Reply #2 on: April 29, 2012, 02:16:10 AM »
Here, I've made one to suit your needs... Created one with dimensions 1.0x1.0 and then in notepad I've changed to be 0.8x0.8... So all you have to do is select pattern that should be in AutoCAD Support Search Path... Then you should set up hatch through BH command (pick hatch under custom patterns, select scale 1000 and pick origin point... Alternatively you can change its orientation to 90 degree if I misunderstood your needs (divisions in X and Y directions)...
So here is *.pat file...

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

fixo

  • Guest
Re: vertial and horizin hatch lisp
« Reply #3 on: April 29, 2012, 02:47:29 AM »
hi freind
i am difficult in my work
that is hatch lisp
i want  200 * 400 size and other size   in  hatch line
i can't find  good lisp

can you help me some

Something like that will be help you too
Code: [Select]
(if (setq  pline (car (entsel "\nSelect a closed contour: ")))
(progn
(setvar "HPNAME" "ANSI31")
(setvar "HPANG" 45)
(command "_.-bhatch" "_S" pline "" "_P" "ANSI31" 64 45.0 "")
    (setvar "HPSCALE" 2)
    (setvar "HPANG" -45)
    (command "_.-bhatch" "_S" pline "" "_P" "ANSI31" 128 -45.0 "")
)
    )

~'J'~
« Last Edit: April 29, 2012, 04:27:15 PM by fixo »

danallen

  • Guest
Re: vertial and horizin hatch lisp
« Reply #4 on: April 29, 2012, 03:04:03 PM »
for simple grids, try "user defined" (instead of "predefined"), and hatch the same boundary twice, one with spacing of 200, the other rotated 90 degrees and spacing 400

dussla

  • Bull Frog
  • Posts: 291
Re: vertial and horizin hatch lisp
« Reply #5 on: May 05, 2012, 11:13:23 AM »
fixo thank you and other freind too
answer  is all good
i used them ~

fixo

  • Guest
Re: vertial and horizin hatch lisp
« Reply #6 on: May 05, 2012, 11:39:17 AM »
Glad you got it to working
Cheers :)

~'J'~

Ketxu

  • Newt
  • Posts: 109
Re: vertial and horizin hatch lisp
« Reply #7 on: May 05, 2012, 12:28:28 PM »
Or sth like this, with multi select :
Code - Auto/Visual Lisp: [Select]
  1. (defun c:df(/ ss varLst oVal)
  2. (or W (setq W 200))
  3. (or H (setq H 400))
  4. (setq W (cond ((getreal (strcat "\nWIDTH < " (rtos W 2 0) " >:")))(W)))
  5. (setq H (cond ((getreal (strcat "\nLENGTH < " (rtos H 2 0) " >:")))(H)))
  6. (setq   varLst '("hpname" "HPORIGINMODE" "hpdouble" "cmdecho" "hpAng")
  7.                 oVal (mapcar 'getvar varLst)
  8. )
  9. (mapcar 'setvar varLst '("_USER" 0 0 0 0))
  10. (prompt "\nPlease select closed plines :")
  11. (if (setq ss (ssget))
  12.         (progn
  13.                 (setvar "hpang" 0)
  14.                 (setvar "hpspace" H)
  15.                 (command "-bhatch" "s" ss "" "")
  16.                 (setvar "hpang" (* pi 0.5))
  17.                 (setvar "hpspace" W)
  18.                 (command "-bhatch" "s" ss "" "")
  19.         )
  20. )
  21. (mapcar 'setvar varLst oVal)
  22. )

dussla

  • Bull Frog
  • Posts: 291
Re: vertial and horizin hatch lisp
« Reply #8 on: May 05, 2012, 01:22:13 PM »
thank  ketxu
but that did not work  well in autocad 2004~~

Ketxu

  • Newt
  • Posts: 109
Re: vertial and horizin hatch lisp
« Reply #9 on: May 08, 2012, 11:51:03 PM »
Srr, i don't have 2004 to test, so you can use fixo's lisp :)