Chumbawamba Posted July 4, 2013 Posted July 4, 2013 I have this macro (from Somewhere) to increment numbers on each click. I would like it to set to object snap Near before i click so it will just snap the number to the nearest thing i click. *^C^C_text;\;$M=$(+,$(getvar,USERI1),1);setvar;USERI1;$M=$(+,$(getvar,USERI1),1); Also is there anyway to change this so the text is rotated 90deg? As a separate macro. Any help greatly appreciated. Thanks in Advance. Quote
JGA Posted July 4, 2013 Posted July 4, 2013 Would this help for the near osnap:- *^C^C_text;[b]NEAR[/b];\;$M=$(+,$(getvar,USERI1),1);setvar;USERI1;$M=$(+,$(getvar,USERI1),1); For the 90 deg option;- *^C^C_text;\[b]90[/b];$M=$(+,$(getvar,USERI1),1);setvar;USERI1;$M=$(+,$(getvar,USERI1),1); The version I have justifies the text to the middle;- *^C^Ctext;[b]_m[/b];\;;$M=$(getvar,USERI1);setvar;USERI1;$(+,1,$(getvar,USERI1)); To reset the Autonumber starting number back to 1 - ^C^C_setvar;USERI1;1 Quote
Chumbawamba Posted July 4, 2013 Author Posted July 4, 2013 thanks the osnap and 90deg codes work a treat but the justifications does not work maybe because i'm on LT 2005 as that's what they use here at work. But that's OK because i don't think i need it anyway. I cannot find any good documentation on the commands and how to compile this code so even though I knew the commands I didnt know where to put them and what to put before and after. Can you recommend a good page or 2 as i would like to learn this? Thanks Quote
Tyke Posted July 5, 2013 Posted July 5, 2013 Try this link for Ralph Grabowski's tutorial: http://www.upfrontezine.com/tailor/tailor17.htm Quote
Chumbawamba Posted July 5, 2013 Author Posted July 5, 2013 Thanks, ill give that a read over the weekend. Quote
Tuns Posted July 12, 2013 Posted July 12, 2013 (edited) Well, if you want a separate macro that rotates 90 degrees here's a fairly simple one. ^C^Crotate;\;\90 Just like the standard rotate command only a couple steps shorter. This will only rotate it upwards though so if you want to have the text face the other way then use this: ^C^Crotate;\;\270 Macros are pretty limited on AutoCAD so I can't think of a simple way to make it rotate either 90 or 270 with only one command. I'll try and think of something. Edited July 15, 2013 by Tuns Quote
Tuns Posted July 15, 2013 Posted July 15, 2013 (edited) ^C^Crotate;\;\90;rotate;previous;;\180; This is all I could think of for the rotating macro you wanted and it's probably the best that can be done with a macro to rotate both 90 and 270 degrees in one command. Edited July 15, 2013 by Tuns Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.