Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
cadking2k5
Posts: 71
Registered: ‎04-17-2012
Message 1 of 3 (146 Views)

(apply 'strcat (list on TWO OR THREE lines

146 Views, 2 Replies
04-21-2012 02:30 PM

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

*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 2 of 3 (119 Views)

Re: (apply 'strcat (list on TWO OR THREE lines

04-21-2012 08:34 PM 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

 

*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 3 of 3 (114 Views)

Re: (apply 'strcat (list on TWO OR THREE lines

04-21-2012 09:00 PM 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.

 

 

 

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community