• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Visual LISP, AutoLISP and General Customization

    Reply
    Active Contributor
    Posts: 36
    Registered: ‎04-17-2012

    (apply 'strcat (list on TWO OR THREE lines

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

    Please use plain text.
    *Expert Elite*
    Posts: 2,070
    Registered: ‎11-24-2009

    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

     

    Please use plain text.
    *Expert Elite*
    Posts: 2,070
    Registered: ‎11-24-2009

    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.

     

     

     

     

     

    Please use plain text.