Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
Posts: 69
Registered: ‎04-17-2012
Message 1 of 3 (140 Views)

(apply 'strcat (list on TWO OR THREE lines

140 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*
Posts: 2,369
Registered: ‎11-24-2009
Message 2 of 3 (113 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*
Posts: 2,369
Registered: ‎11-24-2009
Message 3 of 3 (108 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
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

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

Ask the Community