|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
![]() |
Does anyone have a lisp routine that will put in a leader line and print out the elevation (Z coordinate) as EL 100.00?
|
|
|
|
|
|
#2 |
|
All AUGI, all the time
Join Date: 2003-10
Posts: 525
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Z coordinate of what? The node or point that the leader is pointing to or would the user type an elevation?
|
|
|
|
|
|
#3 |
|
Vice President / Director
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Maybe?
Peter Jamtgaard Code:
(defun C:LEAD100 () (vl-cmdf "leader" pause pause "" "100.00" "") ) |
|
|
|
|
|
#4 |
|
Administrator
Join Date: 2001-08
Location: Seattle WA US
Posts: 4,393
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Peter, I think Denton wants the Z-coord of the object the leader points to.
Denton, what version of AutoCAD? |
|
|
|
|
|
#5 |
|
Member
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
![]() |
Thanks but I got what I needed from a different forum thank you anyway.
|
|
|
|
|
|
#6 |
|
Active Member
Join Date: 2006-05
Location: Riverside, California
Posts: 76
![]() |
I asked for Denton' help with this issue, and basically got a No Thank you, I'm not going to help you reply. See the attached pdf.
Thanks Denton. |
|
|
|
|
|
#7 |
|
Member
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
![]() |
I'm sorry if I misunderstood you, I was not being rude, what help did you want on this? This post was so long ago I'm a little foggy on it. Do you want the routine?
|
|
|
|
|
|
#8 | |
|
AUGI Addict
Join Date: 2005-06
Location: in the upper right corner
Posts: 1,747
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
That's my take on it anyway...
__________________
Ted Those who master others have Force. Those who master themselves have Strength. |
|
|
|
|
|
|
#9 |
|
Member
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
![]() |
Could be, but he seemed upset which was not my intention. Here's the routine for what it's worth. It some functions I use locally for looking up and restoring variables that should be commented out (initerr) and (reset):
Code:
;;; LISP: Elead.lsp ;;; ;;; Version 1.0 D.D. Denton 6/3/04 ;;; Western Area Power Administration ;;; email: denton@wapa.gov 720-962-7360 ;;; ;;; Purpose: Leader line that automatically labels elevations. ;;; ;;; ;;;---------------------------------------------------------------------- (defun elead (/ point ldrent oldecho lastent txtent coord2) (initerr) (vl-load-com) (command "ucs" "w") (defun laycheck ( / laychk) (setq curlayer (getvar "clayer")) (setq laychk (cdr (assoc 2 (tblsearch "layer" "dimen")))) (if (= laychk nil) (command "layer" "m" "dimen" "c" 6 "" "")) (command "layer" "s" "dimen" "") ) (setvar "cmdecho" 0) (laycheck) (check_dim "dim-arrow-leader") (command "ortho" "off") (command "osnap" "end") (setvar "luprec" 2) (setvar "lunits" 2) (while (setq point (getpoint "\nSelect point to label: ")) (setq oldecho (getvar "cmdecho")) (setvar "cmdecho" 0) (setq lastent (entlast)) (command "_.leader" point) (princ "\nNext leader point: ") (command pause) (princ "\nNext leader point: ") (command pause (strcat "EL " (rtos (caddr point))) "") (setq txtent (vlax-ename->vla-object (entlast))) (setq ldrent (vlax-ename->vla-object (entnext lastent))) (setq coord2 (vlax-safearray->list (vlax-variant-value (vla-get-coordinate ldrent 1)))) (if (< (/ pi 2) (angle coord2 (getvar "lastpoint")) (* pi 1.5)) (vla-put-attachmentpoint txtent acAttachmentPointMiddleRight) (vla-put-attachmentpoint txtent acAttachmentPointMiddleLeft) ) (vla-put-insertionpoint txtent (vlax-3d-point (getvar "lastpoint"))) (vla-put-VerticalTextPosition ldrent acVertCentered) (setvar "cmdecho" oldecho) ) (princ) (command "ucs" "v") (reset) ) (defun c:elead () (elead)) Moderator Note:Please use [ CODE ] tags... Last edited by Opie : 2008-05-13 at 07:08 PM. Reason: [CODE] tags added, see Moderator Note |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|