fathihvac Posted August 8, 2011 Author Posted August 8, 2011 Hello Mircea, Can you help me to use (Polar point angle distance) to change text spacing with your code (foreach TextLabel (list (list Text1st Layer1st) (list Text2nd Layer2nd) (list Text3rd Layer3rd)) (command "_TEXT") (if InsertionPoint (setq InsertionPoint (command InsertionPoint TextHeight TextAngle)) (command "")) (command (car TextLabel) "_CHPROP" (entlast) "" "_LA" (cadr TextLabel) "") ) Quote
Lt Dan's legs Posted August 8, 2011 Posted August 8, 2011 (edited) (foreach x (list (cons 1st_text_line 1st_text_layer)(cons 2st_text_line 2st_text_layer)(cons 3st_text_line 3st_text_layer)) (command "_.text" (setq insertionpoint (if insertionpoint (polar insertionpoint ;starting point (* pi 1.5) ;angle away from starting point [angle expressed in radians] 4. ;distance away from starting point ) (list 0. 0. 0.) ) ) "3" ;text height "0" ;text rotation (car x) ) (setq e (entget (entlast))) (entmod (subst (cons 8 (cdr x))(assoc 8 e) e)) ) __Edit__ Converting to Radians (cvunit 90 "degrees" "radians") (* pi 0.5) a popular way (defun dtr ( degrees ) (* pi (/ degrees 180.0)) ) (dtr 90.) all three methods will return 1.5708 (90 degrees in radians). Edited August 8, 2011 by Lt Dan's legs Quote
fathihvac Posted August 8, 2011 Author Posted August 8, 2011 Hello Lt Dan's legs, The following error occured Select insertion point : ; error: bad DXF group: (8 nil) Quote
Lt Dan's legs Posted August 8, 2011 Posted August 8, 2011 (edited) (foreach x [color=red][b](list (cons "1st line of text" "0")(cons "2nd line of text" "Defpoints"))[/b][/color] __EDIT__ also, make sure you turn your osnap off or use "non" before the insertionpoint within the command call example: (command "_.text" [b][color=red]"_non" [/color][/b] (setq insertionpoint ;and so on Edited August 8, 2011 by Lt Dan's legs 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.