Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
pbejse
Posts: 2,425
Registered: ‎11-24-2009
Message 11 of 14 (136 Views)

Re: One button changing text base point to be "Middle Center"

03-22-2012 11:33 PM in reply to: lai

lai wrote:

Hi, i have try and check the pickfirst value is equal to 1..then i try again with your command, still need me to select the text first, else will give me error as i attach..


Now thats odd, it works for me 100% of a time.

 

Okay once and for all:

 

(defun c:MC (/ ss)
  (if (setq ss (ssget "_:L" '((0 . "*TEXT"))))
    (command "_.justifytext" ss "" "_MC")
  )
  (princ)
)

 

Macro

 ^C^CMC

 

HTH

Distinguished Contributor lai
Distinguished Contributor
lai
Posts: 123
Registered: ‎08-15-2011
Message 12 of 14 (133 Views)

Re: One button changing text base point to be "Middle Center"

03-22-2012 11:46 PM in reply to: pbejse

Hmm, weird...Which version of autodesk you were testing previously? Me currently using Autocad 2012..Anyway, i use lisp for it. thanks alot for it..

Distinguished Contributor lai
Distinguished Contributor
lai
Posts: 123
Registered: ‎08-15-2011
Message 13 of 14 (131 Views)

Re: One button changing text base point to be "Middle Center"

03-22-2012 11:54 PM in reply to: lai

Hi pbejse,

Just to share something with you..Just now i try to use back your previous given macro " ^C^C_Tjust;mc; "...I notice that with this command, i can select text first,then click this macro button, it will autochange. But if i click the macro button first and then select text, it woul request me to type MC or just right click mouse button for enter..Guess that after all, no need lisp also can.

 

Just don't know why how come previously when i text it didn't notice it.

*Expert Elite*
pbejse
Posts: 2,425
Registered: ‎11-24-2009
Message 14 of 14 (126 Views)

Re: One button changing text base point to be "Middle Center"

03-23-2012 12:53 AM in reply to: lai

lai wrote:

Hi pbejse,

Just to share something with you..Just now i try to use back your previous given macro " ^C^C_Tjust;mc; "...I notice that with this command, i can select text first,then click this macro button, it will autochange. But if i click the macro button first and then select text, it woul request me to type MC or just right click mouse button for enter..Guess that after all, no need lisp also can.

 

Just don't know why how come previously when i text it didn't notice it.


i see, gald you figure out a solution.

 

Cheers Lai

 


 

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