bigmaz Posted September 21, 2012 Share Posted September 21, 2012 Hi I am looking for a lisp that you would use for a building elevation, and click each level to insert a predefined block with the building level on it. Something similar to this lisp http://www.cadlispandtips.com/2011/10/lisp-elevation-marker.html. But that lisp creates the block within the lisp, I want to be able to use my companies default block for it. Anyone got a lispo for this? Thanks in advance Quote Link to comment Share on other sites More sharing options...
MSasu Posted September 21, 2012 Share Posted September 21, 2012 In the said routine just comment out the part responsible for block creation and use the name of your company block for insertion. Cannot help you more since I don't see the download option on that site (it may not be compatible with my browser). Quote Link to comment Share on other sites More sharing options...
bigmaz Posted September 21, 2012 Author Share Posted September 21, 2012 To be honest, that lisp doesnt work for me, so was hoping someone has a different one. Quote Link to comment Share on other sites More sharing options...
teknomatika Posted September 21, 2012 Share Posted September 21, 2012 To be honest, that lisp doesnt work for me, so was hoping someone has a different one. This will not do? Quote Link to comment Share on other sites More sharing options...
bigmaz Posted September 21, 2012 Author Share Posted September 21, 2012 Thats an excellent lisp of Lee Macs, but it doesnt put in a block. Our company has a certain block they use for these markers. Quote Link to comment Share on other sites More sharing options...
Hexagon Posted December 6, 2012 Share Posted December 6, 2012 Hi, This is not lisp but application written in .NET API and it has option for custom block. It works with AutoCAD 2010 onwards. http://forums.autodesk.com/t5/AutoCAD-2010/Solution-for-Level-Elevation-R-L-E-L-spot-dimension/td-p/3717266 Regards, Haxagon. Quote Link to comment Share on other sites More sharing options...
yathishkumar Posted October 23, 2014 Share Posted October 23, 2014 i need same as funcion vertical scale insert block at invert level by typing on keyboard Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted October 24, 2014 Share Posted October 24, 2014 i need same as funcion vertical scale insert block at invert level by typing on keyboard hi hp dewali . can you provide a drawing/image to explain? Quote Link to comment Share on other sites More sharing options...
K_SIMMONS Posted October 24, 2014 Share Posted October 24, 2014 @bigmaz Can you send me a copy of the block that you want to use and a sample drawing showing how the block is used? kysurveyor3635@bellsouth.net Thanks, Kevin Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 24, 2014 Share Posted October 24, 2014 I think what he wants is pick a point on a drain line and get its elevation, I have some lisps that does this you pick datum first work out rl it may have text also the pick datum line and pick point it returns text value usefull when amending a line on a cross or long section. you can modify this to add block rather than text. ;Calculates level of a point in cross or long sections (setvar "cmdecho" 0) (princ "\n To run just type SRL") ;;-------------------=={ Parse Numbers }==--------------------;;` ;; ;; ;; Parses a list of numerical values from a supplied string. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; s - String to process ;; ;;------------------------------------------------------------;; ;; Returns: List of numerical values found in string. ;; ;;------------------------------------------------------------;; (defun LM:ParseNumbers ( s ) ( (lambda ( l ) (read (strcat "(" (vl-list->string (mapcar (function (lambda ( a b c ) (if (or (< 47 b 58) (and (= 45 b) (< 47 c 58) (not (< 47 a 58))) (and (= 46 b) (< 47 a 58) (< 47 c 58)) ) b 32 ) ) ) (cons nil l) l (append (cdr l) (list nil)) ) ) ")" ) ) ) (vl-string->list s) ) ) (defun c:SRL () (setq olddimzin (getvar "dimzin")) (setvar "dimzin" 0) (if (= dwgscale nil) (setq dwgscale (/ 1000.0 (getreal "\n enter vertical scale "))) ) ;(setq datum (getreal "\n Enter datum level ")) (setq datum (car (LM:ParseNumbers (cdr (assoc 1 (entget (car (entsel "\nPick datum text")))))))) (setq test 1) (setq pt1 (cadr (getpoint "\npick datum"))) (while (= test 1) (setq pt2 (cadr (getpoint "\npick point"))) (setq dist (/(abs (- pt1 pt2)) dwgscale)) (setq en1 (car (entsel "\nSelect text number:" ))) (if (/= en1 nil) (progn (setq tent (entget en1)) (setq a (+ dist datum)) (setq a (rtos a 2 3)) (setq el (subst (cons 1 a) (assoc 1 tent) tent)) (entmod el) );progn (princ "\nplease pick again"); else );if ); while t (setq el nil en nil a nil en1 nil test nil) (setvar "cmdecho" 1) (setvar "dimzin" olddimzin) (princ) ) ;ends main defun Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted October 25, 2014 Share Posted October 25, 2014 thank you BIGAL for sharing. i think the idea is same just maybe OP needs to put in his attrib block? By manually, if positive value i think dimordinate with prefix , my 0.02 Quote Link to comment Share on other sites More sharing options...
yathishkumar Posted October 25, 2014 Share Posted October 25, 2014 hi this is correct but. no need click point. just typing on keyboard based on invert level. my datum is 594, invert level is 600.23, on station 0+321 , y axis in need to place circle or block. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted October 25, 2014 Share Posted October 25, 2014 (edited) hi this is correct but. no need click point. just typing on keyboard based on invert level. my datum is 594, invert level is 600.23, on station 0+321 , y axis in need to place circle or block. you should provide your block reference, otherwise we just attempting. so this just simple other concept, just place text (which does not parse the string like Lee Mac's did) Invert Level Marker by keyboard input [color="red"][EDIT] in red[/color] *IL:shx* *IL:user* ;global variables (defun c:[color="red"]ILM[/color] (/ *error* v var p0 u1 u2 tmp shx f ip sz [color="red"]str[/color]); [color="red"]Invert level[/color] elevation marker ;hanhphuc 25/10/2014 (if (not(findfile (setq shx (strcat(getvar "tempprefix") "IL.shx")))) (progn (setq f (open (setq tmp (strcat(getvar "tempprefix") "IL.shp")) "W")) (foreach x '("*1,42,IL" "4,250,4,4,3,107,3,37,3,28,002,9,(0,0),001,9,(64,111),(-127,0),(-1,0),(64,-111),(0,0),002,9,(0,0),001,4,28,4,37,4,107,3" "4,3,250,0") (write-line x f)) (close f) (command "compile" tmp) ) ); if (if (and (not *IL:shx* ) shx) (setq *IL:shx* (vl-cmdf "load" shx))) (mapcar 'set '( v str *error* var) (list '( "osmode" "cmdecho" "dimzin")'("\nRef. station?" "Datum?" "Textsize?" ) '((msg) (if(not (wcmatch (strcase msg) "*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)))(princ)) (mapcar 'getvar v ))) (foreach x v (setvar x 0)) [color="gray"];;; OP's quoted : " my datum is 594, invert level is 600.23, on station 0+321 "[/color] [color="gray"]so set as default value.. [/color] (setq *IL:user* (if (vl-every 'not *IL:user*) '((0. [color="blue"]594.[/color] 1.) ([color="blue"]321. 600.23[/color])) (list (car *IL:user*) (cadr *IL:user*)))) (if (and (setq p0 (getpoint "\nPick reference point..")) (setq u1 (hp# 'getreal '(0 0 6) str (car *IL:user*))) ) ;_ end of and (progn (prompt (vl-string-translate "?" ":" (apply 'strcat (mapcar ''((a b )(strcat a (rtos b 2 2))) str (car *IL:user*))))) (textpage) (while (if (and (setq u2 (hp# 'getreal '(0 0) '("\nInput STA?" "Invert Level?") (cadr *IL:user*))) (setq *IL:user* (list u1 u2)) (setq ip (mapcar '+ p0 (mapcar '- u2 u1))) ) ;_ end of and (progn (setq sz (caddar *IL:user*)) (vl-cmdf "shape" "IL" ip sz 0.0) (entmakex (list '(0 . "TEXT") (cons 1 (strcat "IL" (rtos (cadadr *IL:user*) 2 2))) (cons 40 sz ) (cons 10 (polar ip (/ pi 4.) (* 1.4121 sz ))) ) ;_ end of list ) ;_ end of entmakex ) ;_ end of progn ) ;_ end of if ) ;_ end of while ) ) ;_ end of if (mapcar 'setvar v var) (princ) ) ;; courtesy of the author's of "Inside AutoLisp" ;; for rel. 10 published by New Riders Publications ;; Referenced to the concept of UREAL UKWORD, ;;;HP# ; user prompt for numbers by hanhphuc 2014 (defun hp# (_f _ini _msg _def / usr l) (if (and(member _f '(getreal getint getdist)) (vl-every '(lambda (x) (= (type x) 'INT)) _ini ) ) (progn (setq usr (mapcar '(lambda (i a b) (initget i) ((eval _f) (strcat a " < "(rtos b 2 2) " > : "))) _ini _msg _def ) ;_ end of mapcar ) ; setq (while usr (setq l (cons (if (null (car usr)) (car _def) (car usr) ) ;_ end of if l ) ;_ end of cons usr (cdr usr) _def (cdr _def) ) ;_ end of setq l ) ;_ end of while (reverse l) ) ;_ end of progn ) ;_ end of if ) ;_ end of defun step: command: [color="red"]ILM[/color] Pick reference point.. [color="red"]; [Pick point at datum in the screen][/color] Ref. station? < 0.00 > : [color="red"]; [ENTER][/color] Datum? < 594.00 > : [color="red"]; [ENTER][/color] Textsize? < 1.00 > : [color="red"]; [ENTER][/color] Ref. station:0.00 | Datum:594.00 | Textsize:1.00 [color="red"] ;<--- Display last input parameters[/color] Input STA? < 321.00 > : 120. Invert Level? < 600.23 > : 690.50 Input STA? < 120.00 > : [color="red"];<-- echo last input value[/color] ... ... **repeating** [ESC] to end Edited October 26, 2014 by hanhphuc rename c:ILM, variable str, code tag, comments Quote Link to comment Share on other sites More sharing options...
yathishkumar Posted October 26, 2014 Share Posted October 26, 2014 Hi Thank you for All i will try it thanx,regards Yathishkumar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.