Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-03, 07:35 PM   #1
denton
Member
 
denton's Avatar
 
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
denton is starting their journey
Default Leader Lisp Routine that puts in the Elevation

Does anyone have a lisp routine that will put in a leader line and print out the elevation (Z coordinate) as EL 100.00?
denton is offline   Reply With Quote
Old 2004-06-03, 10:36 PM   #2
Coolmo
All AUGI, all the time
 
Coolmo's Avatar
 
Join Date: 2003-10
Posts: 525
Coolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightly
Default RE: Leader Lisp Routine that puts in the Elevation

Z coordinate of what? The node or point that the leader is pointing to or would the user type an elevation?
Coolmo is offline   Reply With Quote
Old 2004-06-04, 01:58 PM   #3
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: Leader Lisp Routine that puts in the Elevation

Maybe?

Peter Jamtgaard

Code:
(defun C:LEAD100 ()
 (vl-cmdf "leader" pause pause "" "100.00" "")
)
peter is offline   Reply With Quote
Old 2004-06-04, 06:06 PM   #4
RobertB
Administrator
 
RobertB's Avatar
 
Join Date: 2001-08
Location: Seattle WA US
Posts: 4,393
RobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the stars
Default

Peter, I think Denton wants the Z-coord of the object the leader points to.

Denton, what version of AutoCAD?
RobertB is offline   Reply With Quote
Old 2004-06-07, 03:26 PM   #5
denton
Member
 
denton's Avatar
 
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
denton is starting their journey
Default RE: Leader Lisp Routine that puts in the Elevation

Thanks but I got what I needed from a different forum thank you anyway.
denton is offline   Reply With Quote
Old 2008-05-13, 03:32 PM   #6
steve.perkio
Active Member
 
steve.perkio's Avatar
 
Join Date: 2006-05
Location: Riverside, California
Posts: 76
steve.perkio appears to be going the right way
Default Re: Leader Lisp Routine that puts in the Elevation

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.

Quote:
Originally Posted by denton View Post
Thanks but I got what I needed from a different forum thank you anyway.
Attached Images
File Type: pdf Denton.pdf (29.3 KB, 28 views)
steve.perkio is offline   Reply With Quote
Old 2008-05-13, 03:38 PM   #7
denton
Member
 
denton's Avatar
 
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
denton is starting their journey
Default Re: Leader Lisp Routine that puts in the Elevation

Quote:
Originally Posted by steve.perkio View Post
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.
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?
denton is offline   Reply With Quote
Old 2008-05-13, 05:26 PM   #8
tedg
AUGI Addict
 
tedg's Avatar
 
Join Date: 2005-06
Location: in the upper right corner
Posts: 1,747
tedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the starstedg is shooting for the stars
Default Re: Leader Lisp Routine that puts in the Elevation

Quote:
Originally Posted by denton View Post
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?
I think "steve.perkio" was asking if you had received an answer or resolution to your question, and if so could you point him in the right direction and/or share what you got.

That's my take on it anyway...
__________________
Ted
Those who master others have Force.
Those who master themselves have Strength.
tedg is offline   Reply With Quote
Old 2008-05-13, 05:39 PM   #9
denton
Member
 
denton's Avatar
 
Join Date: 2000-11
Location: Lakewood, CO.
Posts: 14
denton is starting their journey
Smile Re: Leader Lisp Routine that puts in the Elevation

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
denton is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +1. The time now is 12:49 PM.