Lee Mac Posted February 22, 2009 Posted February 22, 2009 Well, I can't view the objects in the file (as I think my version of ACAD is too early) and I have never worked on surfaces before.. So I think this task would be better left to those with a more complete knowledge of surfaces and a later version of ACAD. Hope you get this sorted. Quote
ksperopoulos Posted February 22, 2009 Author Posted February 22, 2009 Thanks for your help anyway. You are the only person who has actually made an effort on this one for me. I appreciate all your help. If I find someone who figures it out, I will be sure to let you know how it works. Quote
ksperopoulos Posted August 14, 2009 Author Posted August 14, 2009 OK. I would like to open this subject back up for discussion. Instead of what I described at the beginning of this thread, how about this. I would like to be able to select an osnap on an object in my drawing that is elevated. (Since this osnap is a known point in the drawing, I am hoping we can bypass the need to work with the surfaces.) From my selection, the command would then drag a leader with the elevation of the osnap. And that's not it. After the osnap elevation is inserted into the block, I would like the block to automatically size according to how long the text is with some preset margins. Is this possible or am I still dreaming? Quote
ksperopoulos Posted June 21, 2010 Author Posted June 21, 2010 I had someone come up with this lisp that gets me pretty close to the final product that I was hoping for on this request. But the guy that wrote this is not sure how finalize it to do what I want. This lisp will insert my block into the drawing with the correct elevation of the pipe, but I am hoping to streamline it even more. I would like this to function like a multileader. My first pick point would be the tip (arrowhead) of the leader. My second pick point would be the end of the leader. It would then insert the landing of the leader with the elevation bubble automatically sized around the text and attached to the leader's landing. And finally, if at all possible, just like on multileaders, I would like the leader to flip to the opposite side of the elevation bubble. This may be a pipe dream, but I thought I would put it in the hands of the experts once again. Thanks in advance for anyone's attempt and good luck! Elevations.zip Quote
wdudley Posted March 19, 2014 Posted March 19, 2014 Lee, I have an elementary lisp program that encloses the text (to size), I would like to have it a block. BT is the command. Will ;;; (B1) Draws a 2 point line and circles the callout number. Adds a dot end. ;;; (B2) Draws a standard leader and circles the callout number. ;;; (BT) Draws a box around text entities at twice the text height. ;;; (C1) Draws a 3 point curved spline and adds the callout number. ;;; (D1) Draws a 2 point line and encloses the callout number. Adds a dot end. ;;; (T1) Draws an ANSI Datum Target to define planes. ;;; (SET) Sets the initial value for incremental numbering. ;;; All are drawn using the current layer, text style, and dimscale. (defun input_integer (a b / c) (setq a (strcat a ":")) (setq c (getint a)) (if (/= c nil) (setq b c) (setq b b) ) ) (setq inc 1) (defun c:B1 () (setvar "cmdecho" 0) (setvar "attdia" 0) (setvar "texteval" 1) (setq os (getvar "osmode")) (setvar "orthomode" 0) (setq pt1 (getpoint "Pick starting point:")) (command "line" pt1 pause "") (setq pt2 (getvar "lastpoint")) (setq rang (angle pt1 pt2)) (setq ang (/ rang 0.017453)) (setq dsc (getvar "dimtxt")) (setq pt3 (polar pt2 rang (* dsc 1.2903))) (if ( (progn (setvar "osmode" 1024) (command "circle" pt3 (* dsc 1.2903)) (command "text" "m" pt3 dsc "0" (itoa inc)) (command "donut" "0.001" (* 0.25 dsc) pt1 "") (setq inc (+ inc 1)) ) ) (setvar "osmode" os) (setvar "orthomode" 1) ) (defun c:B2 () (setvar "cmdecho" 0) (setq dsc (getvar "dimtxt")) (setq os (getvar "osmode")) (setvar "orthomode" 0) (setq pt4 (getpoint "\nPick starting point:")) (command "line" pt4 pause "") (setq pt5 (getvar "lastpoint")) (if ( (setq pt6 (* -1.2903 dsc)) (setq pt6 (* 1.2903 dsc)) ) (setq pt7 (list (+ (car pt5) pt6) (cadr pt5))) (setq pt8 (list (+ (car pt7) pt6) (cadr pt7))) (if ( (progn (command "dim1" "leader" pt4 pt5 pt7 ^C ^C) (setvar "osmode" 1024) (command "circle" pt8 (abs pt6)) (command "text" "m" pt8 dsc 0 (itoa inc)) (setq inc (+ inc 1)) ) ) (setvar "osmode" os) (setvar "orthomode" 1) (princ) ) (defun C:BT () (setvar "cmdecho" 0) (setq os (getvar "osmode") ortho (getvar "orthomode")) (setvar "osmode" 0) (setvar "orthomode" 0) (command "undo" "mark") (prompt "\nSelect text to enclose:") (setq it1 (ssget) i (sslength it1)) (while (> i 0) (setq i (1- i)) (setq en (ssname it1 i)) (setq ed (entget en)) (if (= "TEXT" (cdr (assoc 0 ed))) (progn (setq e1 ed) (setq ofs (/ (cdr (assoc 40 ed)) 2)) (setq ed (subst (cons 72 2) (assoc 72 ed) ed)) (entmod ed) (setq ed (entget en)) (setq pt9 (cdr (assoc 10 ed))) (setq pt10 (cdr (assoc 11 ed))) (setq lt1 (distance pt9 pt10)) (setq ed e1) (entmod ed) (setq pt9a (cdr (assoc 10 ed))) (setq a1 (cdr (assoc 50 ed))) (setq a2 (+ a1 (/ pi 2))) (setq pt9b (polar pt9a (+ a1 pi) ofs)) (setq pt9 (polar pt9b (+ a2 pi) ofs)) (setq pt10 (polar pt9 a1 (+ lt1 (* 2 ofs)))) (setq lt2 (+ (cdr (assoc 40 ed)) (* 2 ofs))) (setq pt11 (polar pt10 a2 lt2)) (setq pt12 (polar pt9 a2 lt2)) (command "pline" pt9 pt10 pt11 pt12 "c") ) (prompt "\nThis is not text!") ) ) (setvar "osmode" os) (setvar "orthomode" 1) (prin1) ) (defun c:C1 () (setvar "cmdecho" 0) (setvar "attdia" 0) (setvar "texteval" 1) (setq othro (getvar "orthomode")) (setvar "orthomode" 0) (setq pt13 (getpoint "\nPick starting point:") pt14 (getpoint "\nPick middle point:") pt15 (getpoint "\nPick end point:")) (command "pline" pt13 pt14 pt15 "") (command "pedit" "l" "s" "") (setq os (getvar "osmode") rang (angle pt14 pt15) ang (/ rang 0.017453) dsc (getvar "dimtxt") pt16 (polar pt15 rang (* dsc 1.2903))) (if ( (progn (setvar "osmode" 1024) (command "text" "m" pt16 dsc "0" (itoa inc)) (setq inc (+ inc 1)) ) ) (setvar "osmode" os) (setvar "orthomode" 1) (princ) ) (defun c:D1 () (setvar "cmdecho" 0) (setvar "attdia" 0) (setvar "texteval" 1) (setq othro (getvar "orthomode")) (setvar "orthomode" 0) (setq pt17 (getpoint "\nPick target point:")) (command "line" pt17 pause "") (setq pt18 (getvar "lastpoint")) (setq rang (angle pt17 pt18)) (setq ang (/ rang 0.017453)) (setq dsc (getvar "dimtxt")) (setq pt19 (polar pt18 rang (* dsc 0.5))) (setq pg1 (getstring "\nEnter number of sides for Delta polygon:" pg1)) (progn (setvar "osmode" 1024) (command "polygon" pg1 pt19 "c" (* dsc 1.1)) (command "trim" "l" "" pt18 "") (command "text" "m" pt19 dsc "0" (itoa inc)) (setq inc (+ inc 1)) (command "donut" "0.001" (* 0.25 dsc) pt17 "") ) (setvar "osmode" os) (setvar "orthomode" 1) (princ) ) (defun c:T1 () (setvar "cmdecho" 0) (setq dsc (getvar "dimtxt") ortho (getvar "orthomode") os (getvar "osmode") tsz (getvar "textsize")) (setvar "osmode" 35) (setvar "orthomode" 0) (setq pt20 (getpoint "\nSelect target point, line or surface:") pt21 (getpoint pt20 "\nPlace Datum Target symbol:") ang (angle pt20 pt21) pt22 (polar pt21 ang (* 3.5 dsc)) pt23 (polar pt21 ang (* 1.75 dsc)) pt24 (polar pt23 pi (* 1.75 dsc)) pt25 (polar pt24 0.0 (* 3.5 dsc)) pt26 (polar pt23 (* 1.50 pi) (* 0.70 dsc)) pt27 (polar pt23 (* 0.50 pi) (* 0.70 dsc)) pt28 (strcase (getstring "\nDatum Plane and Target number?:")) pt29 (getstring "\nTarget area size, :")) (setvar "osmode" 0) (command "line" pt20 pt21 "") (command "circle" "2p" pt21 pt22) (command "line" pt24 pt25 "") (command "text" "m" pt26 dsc "0.00" pt28) (if (> (atof pt29) 0.0) (progn (command "text" "m" pt27 dsc "0.00" (strcat "%%c" pt29)) ) ) (princ) (initget 1 "y n") (setq tx (getkword "\nPlace target point on leader? :")) (if (= tx "y") (progn (command "text" "m" pt20 (* 2 dsc) "" "X") (princ) ) ) (setvar "textsize" tsz) (setvar "osmode" os) (setvar "orthomode" 1) (princ) ) (terpri) (princ " CALLOUT.LSP is loaded. \n Type SET to start or reset the numbering sequence.") (princ) (defun c:SET () (setq inc (input_integer "Enter initial number:" inc)) (terpri) (princ " Type B1 for callout bubbles. B2 for leader bubbles.") (princ "\n C1 for curved callouts. D1 for Delta bubles.") (princ "\n BT for boxed TEXT. T1 for ANSI targets.") (princ) ) Quote
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.