Hi, wonder if anyone know how to make a toolbar button so that when i click it and select a few single text, it will automatic change the text base point to be at "MIDDLE CENTER"....
At the moment, i use to create a button with macro of " ^C^C_text;j;mc "....But the problem is whenever i use this button, i still need to type "MC" at the command prompt.. Any idea how to make it so that after i click the button, all i need to to is just select the text..
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
Solved by pbejse. Go to Solution.
If you are looking to change the justification of EXISTING text, try using the TJUST command.
If you want a macro for creating NEW Text with MC Justification, try:
^C^C_.dtext;_j;_mc;
Well, actually i thought of creating a button that will automatic change selected text to be at Middle Center...If to use the text justification command, i still need to type "MC" after select text that need to be rejustify.
^C^Cselect \Tjust previous ;mc;
BTW; you can still use this
^C^C_Tjust;mc; :
IF you select the entities with grips (note: pickfirst value 1) then click the button
hi pbejse,
Just wonder if can modify abit on this matter.
At current, if i select text first and then use the macro, the text base point won't change..i wish to modify it so that either i click the text or macro first also can change the text base point.any possible? Please advise.
@lai wrote:hi pbejse,
Just wonder if can modify abit on this matter.
At current, if i select text first and then use the macro, the text base point won't change..i wish to modify it so that either i click the text or macro first also can change the text base point.any possible? Please advise.
I'm not sure if it can be done as simple as we had it before,
Tjust is already a lisp code (R 2009 that is).
You could try this
^C^C(if (setq ss (cadr (ssgetfirst)))(command "_select" ss "")(command "_select")) \Tjust previous ;mc
HTH
Well, i just give it a try..guess still the same as before...think need to stick to activate the macro first,then only can select text..Cause i always tend to select the text first before click the macro button.
@lai wrote:Well, i just give it a try..guess still the same as before...think need to stick to activate the macro first,then only can select text..Cause i always tend to select the text first before click the macro button.
Worked fo me here Lai
check pickfirst value.. should be 1
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..
@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
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..
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.
@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