Author Topic: Font width Lisp  (Read 5917 times)

0 Members and 1 Guest are viewing this topic.

One Shot

  • Guest
Font width Lisp
« on: March 11, 2005, 01:37:17 PM »
I am looking for a lisp routine that can change the setting for Simplex. I would like to have the width setting to be at .7

Thank you,

Brad

One Shot

  • Guest
Re: Font width Lisp
« Reply #1 on: March 11, 2005, 02:38:59 PM »
Quote from: One Shot
I am looking for a lisp routine that can change the setting for Simplex. I would like to have the width setting to be at .7

Thank you,

Brad
Code: [Select]
;   File Name: Simplex.LSP
    ;   Description: Sets Simplex font to .7 width
    ;
    ;*******************************************************************************
(defun C:Simplex (/ SSetwidth)
   (command "-style" "Simplex" "0.000" "0.7" "0" "N" "N" "N")
   )
   (princ)
 )




Can someone please tell me how this should be wrote.  Please point out what I did wrong?[/quote]

DParcon

  • Guest
Font width Lisp
« Reply #2 on: March 11, 2005, 02:55:04 PM »
Try to insert the font name as shown.
 Make sure the font you'll be using is available.  

Code: [Select]
(defun C:Simplex (/ SSetwidth)
   (command "-style" "Simplex" "Insert Font Name
                      here" "0" "0.7" "0" "N" "N" "N")
   )
   (princ)
 )



 Don

Adesu

  • Guest
Re: Font width Lisp
« Reply #3 on: March 15, 2005, 09:05:37 PM »
Quote from: One Shot
I am looking for a lisp routine that can change the setting for Simplex. I would like to have the width setting to be at .7

Thank you,

Brad


or you can change width factor with this here

Code: [Select]
; wf is stand for making edit to width factor
;       Design by Ade Suharna <mteybid@yuasabattery.co.id>
;       1 September 2004
;       program no. 60/09/2004
;       edit by Ade Suharna 05/10/2004 1).
(defun c:wf (/ ent info41 opt ed)
  (while                                                ; 1).
  (setq ent (entget (car (entsel)))
        info41 (rtos (cdr (assoc 41 ent)))
  opt
(getreal
  (strcat "\nENTER NEW FACTOR" "<" info41 ">" ":"))
        ed (subst (cons 41 opt)(assoc 41 ent) ent))
  (entmod ed)
  )
(princ)
  )

One Shot

  • Guest
Font width Lisp
« Reply #4 on: March 17, 2005, 12:49:33 PM »
Can someone modify this lisp work to select all and to allow text lines that stack to be set 1.5 apart.  It also work for text that is in Mtext and for veticle text.

Thank you,

Brad

Code: [Select]

; wf is stand for making edit to width factor
; Design by Ade Suharna <mteybid@yuasabattery.co.id>
; 1 September 2004
; program no. 60/09/2004
; edit by Ade Suharna 05/10/2004 1).
(defun c:wf (/ ent info41 opt ed)
(while ; 1).
(setq ent (entget (car (entsel)))
info41 (rtos (cdr (assoc 41 ent)))
opt
(getreal
(strcat "\nENTER NEW FACTOR" "<" info41 ">" ":"))
ed (subst (cons 41 opt)(assoc 41 ent) ent))
(entmod ed)
)
(princ)
)

One Shot

  • Guest
Re: Font width Lisp
« Reply #5 on: March 17, 2005, 05:52:35 PM »
Quote from: Adesu
Quote from: One Shot
I am looking for a lisp routine that can change the setting for Simplex. I would like to have the width setting to be at .7

Thank you,

Brad


or you can change width factor with this here

; wf is stand for making edit to width factor
;       Design by Ade Suharna <mteybid@yuasabattery.co.id>
;       1 September 2004
;       program no. 60/09/2004
;       edit by Ade Suharna 05/10/2004 1).
(defun c:wf (/ ent info41 opt ed)
  (while                                                ; 1).
  (setq ent (entget (car (entsel)))
        info41 (rtos (cdr (assoc 41 ent)))
     opt
    (getreal
      (strcat "\nENTER NEW FACTOR" "<" info41 ">" ":"))
        ed (subst (cons 41 opt)(assoc 41 ent) ent))
  (entmod ed)
  )
(princ)
  )


Ade,

I should have asked this before I requested for alteration of your code.  My this code be changed to meet the needs for other users could use it for.

Thank you,

Brad :?:

Adesu

  • Guest
Re: Font width Lisp
« Reply #6 on: March 17, 2005, 08:29:26 PM »
Quote from: One Shot
Quote from: Adesu
Quote from: One Shot
I am looking for a lisp routine that can change the setting for Simplex. I would like to have the width setting to be at .7

Thank you,

Brad


or you can change width factor with this here

; wf is stand for making edit to width factor
;       Design by Ade Suharna <mteybid@yuasabattery.co.id>
;       1 September 2004
;       program no. 60/09/2004
;       edit by Ade Suharna 05/10/2004 1).
(defun c:wf (/ ent info41 opt ed)
  (while                                                ; 1).
  (setq ent (entget (car (entsel)))
        info41 (rtos (cdr (assoc 41 ent)))
     opt
    (getreal
      (strcat "\nENTER NEW FACTOR" "<" info41 ">" ":"))
        ed (subst (cons 41 opt)(assoc 41 ent) ent))
  (entmod ed)
  )
(princ)
  )


Ade,

I should have asked this before I requested for alteration of your code.  My this code be changed to meet the needs for other users could use it for.

Thank you,

Brad :?:


Yes ,please if you want to alter for this code,in this code I prepare special line for edit by,as like this

--------------<snip>-------------------------
;       program no. 60/09/2004
;       edit by Ade Suharna 05/10/2004 1).
;                  One Shot   18/03/2005    2).
(defun c:wf (/ ent info41 opt ed)
--------------<snip>--------------------------

t-bear

  • Guest
Font width Lisp
« Reply #7 on: March 18, 2005, 09:45:18 AM »
Thanks Adesu, for giving permission ... and to Brad for asking.  In the hurry of our jobs, we sometimes forget these amenities.  Good show to both of you .... and thanks for the code!! LOL

Adesu

  • Guest
Font width Lisp
« Reply #8 on: March 20, 2005, 07:04:49 PM »
Quote from: t-bear
Thanks Adesu, for giving permission ... and to Brad for asking.  In the hurry of our jobs, we sometimes forget these amenities.  Good show to both of you .... and thanks for the code!! LOL


You are welcome,thanks.