Author Topic: Separate hatches  (Read 765 times)

0 Members and 1 Guest are viewing this topic.

mohan

  • Newt
  • Posts: 98
Separate hatches
« on: July 24, 2022, 04:14:54 AM »
Please help to fix my route to separate hatches as below image
Don't worry about the hatch patterns what i want is specify internal point should repeat as per my click (6 times it should repeat)
I hope you got my point

Code - Auto/Visual Lisp: [Select]
  1. (defun c:pavementlayout ( / hpn p el )
  2. (setvar 'hpname "ANSI31")
  3. (if (setq hatch (ssget ":S:L" '((0 . "HATCH"))))
  4. (command "HATCHGENERATEBOUNDARY" hatch "") (command "Erase" hatch "")))
  5. (setq p (getpoint "\nPick or specify internal point : "))
  6. (vl-cmdf "_.-BHATCH" "_P" "" 0.05 0.0 "_A" "_B" "_E" "_S" "_N" "_A" "_N" "_H" "_N" "" "_non" p)
  7.     (while (< 0 (getvar 'cmdactive)) (vl-cmdf ""))
« Last Edit: July 24, 2022, 04:23:23 AM by mohan »
"Save Energy"

mohan

  • Newt
  • Posts: 98
Re: Separate hatches
« Reply #1 on: July 24, 2022, 11:14:40 AM »
Code - Auto/Visual Lisp: [Select]
  1. (defun c:pavementlayout ( / hpn p el )
  2. (setvar 'hpname "ANSI31")
  3. (if (setq hatch (ssget ":S:L" '((0 . "HATCH"))))
  4. (command "HATCHGENERATEBOUNDARY" hatch "") (command "Erase" hatch "")))
  5. (while (setq p (getpoint "\nPick or specify internal point : "))
  6.   (vl-cmdf "_.-BHATCH" "_P" "" 0.05 0.0 "_A" "_B" "_E" "_S" "_N" "_A" "_N" "_H" "_N" "" "_non" p)
  7.   (vl-cmdf "")
  8. )

I have fixed myself.
« Last Edit: July 24, 2022, 11:19:04 AM by mohan »
"Save Energy"