Author Topic: Help, how such array  (Read 2521 times)

0 Members and 1 Guest are viewing this topic.

myloveflyer

  • Newt
  • Posts: 152
Help, how such array
« on: September 29, 2011, 09:23:22 PM »
The following drawings, please help us look at how to use LISP to achieve the right image!thank
Never give up !

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Help, how such array
« Reply #1 on: September 30, 2011, 02:26:55 AM »
Is the width of the panels always the same? Looks like 1640 on your drawing. Just guessing, but is that a standard sheet-metal size?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help, how such array
« Reply #2 on: September 30, 2011, 07:51:53 AM »
You could hatch using USER pattern, 90 deg and spacing 820.
Adjust the Base Point: (pick the roof peak)
Code: [Select]
;;  CAB 10.29.2007
;; Hatch Base Point Edit
(defun c:HBPEdit (/ ent elst x y bp)
  (command "._undo" "_begin")
  (if (and (setq ent (car (entsel "\nSelect hatch for new base point.")))
           (= (cdr (assoc 0 (setq elst (entget ent)))) "HATCH")
      )
    (while (setq bp (getpoint "\nSelect new basepoint: "))
      (setq x (car bp)
            y (car (cdr bp))
      )
      (setq elst (subst (cons 43 x) (assoc 43 elst) elst))
      (setq elst (subst (cons 44 y) (assoc 44 elst) elst))
      (entmod elst)
    )
    (prompt "\nNot a hatch, bye.")
  )
  (command "._undo" "_end")
  (princ)
)
Then explode the hatch.  8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Help, how such array
« Reply #3 on: September 30, 2011, 11:52:30 AM »
The new array command in 2012 should easily be able to accomplish this as well.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help, how such array
« Reply #4 on: September 30, 2011, 05:31:51 PM »
How about this: (no layer support)

Code: [Select]
(defun c:test(/ p1 p2 ent)
  (if (and
    (setq p1 (getpoint "\nSpecify hatch origon."))
    (setq p2 (getpoint "\nSpecify internal point."))
    )
    (progn
       (Command "-HATCH" "_P" "_USER" 90.0 820.0 "_N" "_O" "_S" "_non" p1 "_N" "_non" p2 "")
   
      (if (and (setq ent (entlast)) (equal '(0 . "HATCH") (assoc 0 (entget ent))))
        (command "._explode" ent "")
      )
    )
  )
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

myloveflyer

  • Newt
  • Posts: 152
Re: Help, how such array
« Reply #5 on: October 06, 2011, 02:13:32 AM »
Irneb:

The width of the plate to artificially set, DWG is 820.

CAD:

Program failed to run.

THANKS!

This procedure is to calculate a wall plate (in addition to the window and door ) were ranked number plates, so that the processing factory

Never give up !

bchapman

  • Guest
Re: Help, how such array
« Reply #6 on: October 09, 2011, 10:16:51 PM »
Have you explored express tools -> super hatch? I've never used it but it might work for this situation.