Author Topic: Linetype Help! (need distance inside)  (Read 2722 times)

0 Members and 1 Guest are viewing this topic.

Zykl0

  • Guest
Linetype Help! (need distance inside)
« on: March 12, 2009, 11:56:43 AM »
Hello,

I'm trying to create a linetype with 2 number inside, 50 ft. and 75ft. with continuous line.
I made the linetype but for some reasons when i draw the line the 50ft. and 75ft. does not apear at the correct distance, and everytime i draw a line the number are at different place.

I joined a the dwg.
if someone know a better idea to make something similar to this let me know! Basicaly i need to make PLINE inside many passageway  in many direction but i need somekind of alert to let me know when i reach 30' 50' and 75' so i can insert an extinguisher there.

Thank you for any solutions!


ronjonp

  • Needs a day job
  • Posts: 7529
Re: Linetype Help! (need distance inside)
« Reply #1 on: March 12, 2009, 12:17:10 PM »
Not a solution for the linetype (the distance between the text is controlled by LTSCALE) but you could use vlax-curve-getpointatdist to place your hydrants.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Zykl0

  • Guest
Re: Linetype Help! (need distance inside)
« Reply #2 on: March 12, 2009, 01:09:50 PM »
Thanks for the answer, but i dont know what you are talking about with vlax command  :?

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Linetype Help! (need distance inside)
« Reply #3 on: March 12, 2009, 01:22:48 PM »
Thanks for the answer, but i dont know what you are talking about with vlax command  :?

Give this a try on polyline:

Code: [Select]
(defun c:test (/ distances e pt)
  (setq distances '(30 50 75))
  (if (and (setq e (car (entsel "\nSelect polyline: ")))
           (= (cdr (assoc 0 (entget e))) "LWPOLYLINE")
      )
    (foreach dist (if (member (getvar 'lunits) '(3 4))
                    (mapcar '(lambda (x) (* x 12.)) distances)
                    distances
                  )
      (if (setq pt (vlax-curve-getpointatdist e dist))
        (entmakex (list (cons 0 "CIRCLE")
                        (cons 8 "hydrant")
                        (cons 10 (trans pt 1 0))
                        (cons 40 5.0)
                  )
        )
      )
    )
  )
  (princ)
)
« Last Edit: March 12, 2009, 01:30:26 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Zykl0

  • Guest
Re: Linetype Help! (need distance inside)
« Reply #4 on: March 12, 2009, 01:39:44 PM »
Thank you Ron, this is a good alternative  :-)
but im sad, the ltype doesnt work.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Linetype Help! (need distance inside)
« Reply #5 on: March 12, 2009, 01:55:10 PM »
Thank you Ron, this is a good alternative  :-)
but im sad, the ltype doesnt work.

Glad it worked for you  :-)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC