• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

format a text string

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
how can you format a string so you have a default constant length?
example :
- constant length = 38
- actual length = 12
- spaces to be inserted = 26
Thank you.
 
(Sectq text (entget))
(setq string)
(setq l_eff (strlen string))
(setq l_cost (getint "continuous length:"))
(setq loop (- l_cost l_eff))
(setq stringa_rev string)
(repeat loop
(setq stringa_rev (strcat stringa_rev "))
); closure repeat
(setq text2 (subst (cons '1 stringa_rev) (assoc '1 text)))
(introduced text)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top