Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(apply 'strcat (list on TWO OR THREE lines

2 REPLIES 2
Reply
Message 1 of 3
cadking2k5
457 Views, 2 Replies

(apply 'strcat (list on TWO OR THREE lines

On this the NS list comes up on the dimension all on one line is there a way to get it to come uo on 2 or 3 lines 

(setq DM (* rd 2))
  (setq DM1 (* rdl 2))
  (setq oldtstyle (getvar "textstyle"))
  (Setq userfont "GDT_IV50.ttf") ;_ <<<<change this for your textfont
  (setvar "textstyle" (cdr (assoc 2 (tblnext "style" t))))
  (command "._Style" "" userfont 0.125 1 0 "N" "N")
  (COMMAND "_DIMDIAMETER" PT1 pt2)
  (setq dia (entlast))
  (setq cobj (vlax-ename->vla-object dia))
  (setq _str (lambda (num)           
  (if (eq (type num) 'INT)(itoa num)
     (rtos num))))
(setq ns (apply 'strcat (list "n " (_str DM1) " v " "n " (_str DM) " x " (_str dp))))
  (vlax-put-property cobj 'TextOverride ns)
  )

2 REPLIES 2
Message 2 of 3
pbejse
in reply to: cadking2k5

(setq ns (strcat "n " (_str DM1) "\\X" " v " "n " (_str DM) " x " "\\P" (_str dp)))

 

\\X -->  Under Dimension Line (one time)

\\P -->  Under  String (every call)

 

 "<>\\Xbanana\\Pcake\\PHouse"

 

   12   

Banama

  cake

House

 

Message 3 of 3
pbejse
in reply to: cadking2k5


@cadking2k5 wrote:

(setq ns (apply 'strcat (list "n " (_str DM1) " v " "n " (_str DM) " x " (_str dp))))


 

Read about when and when not to use apply on your previous thread.

 

vlax-put-property 'TextOverride srting  post # 6 - 7 

 

Keep on coding.

 

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost