Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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

Posted

Thanks, ill give that a read over the weekend. :)

Posted (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 by Tuns
Posted (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 by Tuns

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...