Author Topic: Multiple lines  (Read 2702 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Multiple lines
« on: August 16, 2004, 02:11:57 PM »
I am seeking the following:

1. Ability to draw multiple parallel plines.
2. Lines can be 2 or 3 or 4 or 5 or as many as needed
3. I need the ability to type in whatever spacing I need at the time

I am seeking a routine that uses one routine and the least amount of steps possible. I am trying to avoid offset and array as separate commands after drawing a single pline.......if anyone has any ideas it would be greatly appreciated...


Thanks

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Multiple lines
« Reply #1 on: August 16, 2004, 02:38:34 PM »
If you have ACAD 2000 or newer, Have you tried the "MLINE" command?
I drink beer and I know things....

TJAM51

  • Guest
Multiple lines
« Reply #2 on: August 16, 2004, 05:56:07 PM »
I perfer not to use the mline command


Thanks

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Multiple lines
« Reply #3 on: August 16, 2004, 07:09:55 PM »
Any reason why?
I drink beer and I know things....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Multiple lines
« Reply #4 on: August 16, 2004, 08:32:22 PM »
TJ
You can start with something like this.
You will need to add some bells & whistles though as this has little
error checking and only draws a LINE object.

Code: [Select]
(defun c:lns (/ usercmd p1 p2 p3 dist cnt)
  (setq usercmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (if (and (setq p1 (getpoint "\nStart of line."))
           (setq p2 (getpoint p1 "\nPick end of line."))
           (null (command "._line" p1 p2 ""))
           (setq dist (getdist "\nEnter offset distance."))
           (setq cnt (getint "\nEnter number of lines."))
           (setq p3 (getpoint "\nPick side to offset."))
      )
    (progn
      (while (> (setq cnt (1- cnt)) 0)
        (command "._offset" dist (entlast) (polar p3 (angle p1 p3) (* dist 100))"")
      ) ; while
    ) ; progn
  ) ; endif
  (setvar "CMDECHO" usercmd)
  (princ)
) ; defun
(prompt "\nParallel Lines Routine loaded, Enter LNS to run.")
(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.

daron

  • Guest
Multiple lines
« Reply #5 on: August 17, 2004, 08:15:13 AM »
Mlines are nice. When you're done with them, just explode them. Viola, multiple lines.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Multiple lines
« Reply #6 on: August 17, 2004, 08:35:19 AM »
Hay, that's a good tip, Daron
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.