Jump to content

Recommended Posts

Posted

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) "") )

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • fathihvac

    7

  • Lt Dan's legs

    7

  • MSasu

    4

  • BlackBox

    3

Top Posters In This Topic

Posted Images

Posted (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 by Lt Dan's legs
Posted

Hello Lt Dan's legs,

The following error occured

Select insertion point : ; error: bad DXF group: (8 nil)

Posted (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 by Lt Dan's legs

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...