student21 Posted February 15, 2010 Share Posted February 15, 2010 Need help, I found this program that does pretty much what I need it to do, but I would like it to use the current text style instead of using "standard" and more importantly I need it to put the text at the "midpoint" of the line or lines either above or below. Thank you much (defun c:LINELENGTH ( / CONST_STYLE CONST_TXT-HT CONT COUNT DIST ENT IP LAYER ROT SS) (if (setq ss (ssget)) (progn (setq count 0) (repeat (sslength ss) (setq cont (entget (ssname ss count))) (if (= "LINE" (cdr (assoc 0 cont))) (progn (setq CONST_txt-ht 1.0 CONST_style "LY080" layer (cdr (assoc 8 cont)) ip (cdr (assoc 10 cont)) rot (angle (cdr (assoc 10 cont)) (cdr (assoc 11 cont))) dist (distance (cdr (assoc 10 cont)) (cdr (assoc 11 cont))) ent (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 8 layer) (cons 100 "AcDbMText") (cons 10 ip) (cons 40 CONST_txt-ht) (cons 41 dist) (cons 71 7) (cons 72 5) (cons 1 (rtos dist 2)) (cons 7 CONST_style) (list 210 0.0 0.0 1.0) (cons 11 (cdr (assoc 11 cont))) (cons 50 rot) (cons 73 1) (cons 44 1.0) ) ) (entmake ent) ) ) (setq count (1+ count)) ) ) ) ) Quote Link to comment Share on other sites More sharing options...
lpseifert Posted February 15, 2010 Share Posted February 15, 2010 Are you interested in learning how to edit the code or is this a request for someone to do it for you? Quote Link to comment Share on other sites More sharing options...
student21 Posted February 16, 2010 Author Share Posted February 16, 2010 Preferably I would want someone to code it for me. If that is possible. Thanks 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.