PDA

View Full Version : Piping Invert Levels



Jhun Gonzalo
11th May 2009, 01:29 pm
Hi,

Good day to all:D, please is there any body have a Lisp route that create a level dimension text just on the first pick the ground level and second pick to the bottom line of the pipe to get the distance height of pipe then the leader arrow head will position to the second pick, level text will position any were that i want.

If ever please provide:lol: me a route showing the image below
Thank you..

Regards
JG

Lee Mac
11th May 2009, 01:51 pm
Quick and dirty:



(defun c:ql (/ pt1 pt2)
(setq oldcmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(while (and (setq pt1 (getpoint "\nSelect First Point: "))
(setq pt2 (getpoint pt1 "\nSelect Second Point: ")))
(command "_qleader" pt2 pause "" ""
(strcat "IL +" (rtos (distance pt1 pt2) 2 2) "mm") ""))
(setvar "CMDECHO" 1)
(princ))

Jhun Gonzalo
11th May 2009, 02:25 pm
wow:D thanks Lee, magnificent, little request, can it be possible that the leader will make it 3 points so that i can grip the leader near at text.
Thanks again:lol:



(defun c:ql (/ pt1 pt2)
(setq oldcmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(while (and (setq pt1 (getpoint "\nSelect First Point: "))
(setq pt2 (getpoint pt1 "\nSelect Second Point: ")))
(command "_qleader" pt2 pause "" ""
(strcat "IL +" (rtos (distance pt1 pt2) 2 2) "mm") ""))
(setvar "CMDECHO" 1)
(princ))
[/quote]

Lee Mac
11th May 2009, 03:41 pm
This may depend on your initial leader settings, but give it a go



(defun c:ql (/ oldcmd pt1 pt2)
(setq oldcmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(while (and (setq pt1 (getpoint "\nSelect First Point: "))
(setq pt2 (getpoint pt1 "\nSelect Second Point: ")))
(command "_qleader" pt2 pause pause ""
(strcat "IL +" (rtos (distance pt1 pt2) 2 2) "mm") ""))
(setvar "CMDECHO" oldcmd)
(princ))

Jhun Gonzalo
11th May 2009, 06:02 pm
Yes Lee i got it. Thanks

Cheers:D

Lee Mac
11th May 2009, 06:03 pm
Happy to help :)