TheSwamp

CAD Forums => CAD General => Topic started by: hudster on February 05, 2004, 07:09:37 AM

Title: Macro Commands
Post by: hudster on February 05, 2004, 07:09:37 AM
I thought I'd post a few of my macro button commands here in the hope they might be useful to someone.

Also If anyone else has any macro commands set up could they post them here in case I might also find them useful.

Cheers
Andy :evil:

Isolate Layer, Similar to express tools layeriso cammand, except layers are frozen not turned off
^C^CAI_MOLC;\-LAYER;F;*;;

UN-FREEZE ALL LAYERS
^C^C-LAYER;T;*;;

Set fillet Radius to zero and then resume fillet command
^C^C_fillet;r;0;fillet;

Rotate Selected Attributes to zero degrees (note this macro runs till escape is pressed)
*^C^C-attedit;Y;;;;\;a;0;;

Lock selected Viewport
^C^CMVIEW;LOCK;ON;;

Unlock selected viewport
^C^Cmview;lock;off;;

Zoom last Viewport to 1:50
^C^C_.MSPACE;Z;S;1/50XP;_.PSPACE;;

Zoom Last Viewport to 1:100
^C^C_.MSPACE;Z;S;1/100XP;_.PSPACE;;

Zoom last viewport to 1:200
^C^C_.MSPACE;Z;S;1/200XP;_.PSPACE;;
Title: Macro Commands
Post by: 42 on February 05, 2004, 07:18:39 AM
Variation on draw order. Deleates an object and reinserts it in the same place
^C^C_select;_auto;\_copy;_p;;0,0;@;_erase;_p;;
Rotates the current UCS by  90° changes to plan and gives the option to zoom window
^C^C_ucs _z  90 plan c z

select dim command and changes the layer to A0DIM and creates that layer if not present.
^C^C_-layer M A0DIM c 2 A0DIM  _dimlinear -layer

Switches to A0DIM when using dim continue
^C^C_-layer s A0DIM  _dimcontinue
Title: Macro Commands
Post by: hudster on February 05, 2004, 07:39:13 AM
This one allows you to select a point from the mid point of two selected points
Use it with a command to draw a line or insert a block etc. at the mid point

_non;'cal (cur + cur)/2;
Title: Macro Commands
Post by: hyposmurf on February 05, 2004, 08:03:35 AM
Rather than plot the drawing and realise youve forgot to turn off your layer that your viewports are on ,this macro can be used.
^C^C-layer;off;myviewportlayername;;_PLOT;LAYER;on;myviewportlayername;;
Title: Macro Commands
Post by: 42 on February 05, 2004, 08:04:37 AM
Or just keep your viewports on a non plotting layer.
Title: Macro Commands
Post by: CAB on February 05, 2004, 08:52:17 AM
Quote
Restore ucs to plan
^C^C-view;top;

Change to right elevation view, rotate dwg -90 deg
^C^Cdview;;tw;-90;;_ucs;w;_ucs;z;90;

Change to left elevation view, rotate dwg 90 deg
^C^Cdview;;tw;90;;_ucs;w;_ucs;z;270;

Change to rear elevation view, rotate dwg 180 deg
^C^Cdview;;tw;180;;_ucs;w;_ucs;z;180;

Select the dim to continue from
^C^C_dimcontinue;S;

Fillet until Escape
^C^C_Multiple;_Fillet;
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 09:16:04 AM
Allows user to change Mtext editor to windows Notepad. Then returns to Mtext editor.

^C^Cmtexted;c:/where/notepad/is.exe;ddedit;\;mtexted;internal;;

Opens properties with Design Center. You can put layers or blocks and so on........

^C^C_adcnavigate;H:/dwg/with/stuff.dwg/Blocks^M;;
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 09:22:52 AM
Turns a line and any additional lines into a Pline with the width of .xxx.

^C^C_pedit;\yes width .xxx;join

Purges all of drawing

^C^C-purge all  no
Title: Macro Commands
Post by: hudster on February 05, 2004, 09:25:09 AM
Allows user to change Mtext editor to windows Notepad. Then returns to Mtext editor.

^C^Cmtexted;c:/where/notepad/is.exe;ddedit;\;mtexted;internal;

this works better if you add and extra ; at the end.

It wasn't returning to the command prompt with one ;

^C^Cmtexted;c:/where/notepad/is.exe;ddedit;\;mtexted;internal;;
Title: Macro Commands
Post by: Mark on February 05, 2004, 09:31:17 AM
This works for me on 2004, also added an extra ';' to the end.
Code: [Select]

^C^Cmtexted;notepad.exe;ddedit;\;mtexted;internal;;;
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 09:32:28 AM
Hudster,

For some reason it stops me and I have to press enter for it to take Internal..... They way I had works for me, maybe cause I have LT? I put an extra ; for you FULL BLOWN CAD people.... :wink:
Title: Macro Commands
Post by: daron on February 05, 2004, 09:37:34 AM
You're trying to change mtext editor to notepad? Heh. You make it out too hard. OPTIONS->Files->Text Editor, Dictionary, and Font File Names->Text Editor Application->c:\windows\notepad.exe
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 09:51:10 AM
Maybe some you can help me tweak this.......
I am at times having to copy something from mtext and pasting it into a  attribute (multiple times) and vice versa. This is what I got...


^C^C_DDEDIT;\;_ATTEDIT;\_DDEDIT;\;_ATTEDIT;\
Title: Macro Commands
Post by: daron on February 05, 2004, 10:05:57 AM
Where does it fail? My guess would be during the first attedit.
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 10:08:57 AM
It dosent.... I was wondering if anybody could make improvements.....

Is there anyway to make it continue and stop when I press escape?

I like it cause I hate having to guess if some text is ddedit or attedit. This way it dosent matter.....
Title: Macro Commands
Post by: hudster on February 05, 2004, 10:10:11 AM
That worked for me although if you want it to keep running put a * at the start so you have the command as

*^C^C_DDEDIT;\;_ATTEDIT;
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 10:12:23 AM
sweet.... learn something new everyday.
Title: Macro Commands
Post by: hudster on February 05, 2004, 10:14:07 AM
Vertical I loved your Mtext editor macro su much I made a button image for it.

(http://theswamp.org/lilly.pond/Hudster/notepad.bmp)

available here http://theswamp.org/lilly.pond/Hudster/notepad.bmp
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 10:33:55 AM
How about this?

*^C^C_Craig;reply;Jokes;
 
:lol:  :lol:  :lol:
Title: Macro Commands
Post by: hudster on February 05, 2004, 10:34:30 AM
Here's a macro command to open the windows calculator

^C^C_START;C:/I386/CALC.EXE;

This is the default location for windows calculator under Xp, I Don't know if it's the same for all versions.
Title: Macro Commands
Post by: Craig on February 05, 2004, 10:40:43 AM
Quote from: VerticalMojo
How about this?

*^C^C_Craig;reply;Jokes;
 
:lol:  :lol:  :lol:

Hey! :?  :shock:  :?  :(  :oops:  :cry:
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 10:46:48 AM
Oh craig.... I enjoy them!  :D

How do you get so many?

Hudster, On mine it dosent recognize _Start....?
Title: Macro Commands
Post by: hudster on February 05, 2004, 11:00:38 AM
mite be a just full cad thingy then.
Title: Macro Commands
Post by: ELOQUINTET on February 05, 2004, 11:02:11 AM
here's a couple of mine. question though about the last two. what do i add to have the layer switch back to the previous after it hatches?

sets layer to 0 then performs block command:

^C^C(command "-layer" "n" "0" "c" "WHITE" "0" ) ;setvar clayer "0";b

sets layer to 0-by others then performs hatch command:

^C^C(command "-layer" "n" "0-BY OTHERS" "c" "9" "0-BY OTHERS" ) ;setvar clayer "0-BY OTHERS";hpname;stipple;hpscale;1;bhatch

sets layer to 0-hatch then performs hatch command:

^C^C(command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" ) ;setvar clayer "0-HATCH";hpname;STEEL;hpscale;1;hpang;0;bhatch
Title: Macro Commands
Post by: ELOQUINTET on February 05, 2004, 11:21:08 AM
anybody know if i could add something to qleader to turn the capslock on. that would be great!
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 11:23:39 AM
Quote from: Hudster
mite be a just full cad thingy then.


Awww shucks...... theres got to be a way :?
Title: Macro Commands
Post by: daron on February 05, 2004, 11:24:18 AM
(command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" );(setq var (getvar 'clayer));setvar clayer "0-HATCH";hpname;STEEL;hpscale;1;hpang;0;bhatch;/;(setvar 'clayer var);

Not sure about that part between bhatch and the reset, though.
Title: Macro Commands
Post by: ELOQUINTET on February 05, 2004, 12:21:13 PM
daron not working, here's the results i get:

Command: (command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" )
-layer
Current layer:  "ALUMINUM"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
n
Enter name list for new layer(s): 0-HATCH
Layer "0-HATCH" already exists.
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
c
Enter color name or number (1-255): 9
Enter name list of layer(s) for color 9 <ALUMINUM>: 0-HATCH Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
nil
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
(setq var (getvar 'clayer))
"ALUMINUM"
Invalid option keyword.
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
Title: Macro Commands
Post by: daron on February 05, 2004, 12:28:32 PM
Don't create a new layer called "o-hatch". If you want to make sure it exists, use make not new.
Title: Re: Macro Commands
Post by: VerticalMojo on February 05, 2004, 12:39:36 PM
Quote from: Hudster
Rotate Selected Attributes to zero degrees (note this macro runs till escape is pressed)
*^C^C-attedit;Y;;;;\;a;0;;


try this......

*^C^C-ate;YES;;;;\;ANGLE 0;POSITION;\;

you may have to add a ; at the end if you have full version of cad.....
Allows you to rotate the attribute and then position it.....
Title: Macro Commands
Post by: ELOQUINTET on February 05, 2004, 12:43:46 PM
here's a few more:

sets point style so i can see the nodes when object is divided then divides:

^C^Cpdmode;35;pdsize;3;divide

sets the units the way i want then performs offset:

^C^C-units;5;32;1;2;0.00;N;(graphscr);OFFSET;1/32
Title: Macro Commands
Post by: VerticalMojo on February 05, 2004, 04:59:36 PM
I have the some express tools for LT if anybody wants them.......

Download them here...

LT express tools (http://theswamp.org/lilly.pond/VerticalMojo/LTXpress.zip)

The help text doc. tells you how to install them... enjoy!
Title: Macro Commands
Post by: Spageddie on February 05, 2004, 05:58:48 PM
8) For which LT version ?
Title: Macro Commands
Post by: hyposmurf on February 05, 2004, 06:01:45 PM
Yeh that would make Kate's day. :)
Title: Macro Commands
Post by: Sitra on February 06, 2004, 09:07:48 AM
The LT express tools were made for LT 2004. But, they seem to be compatible with LT 2000 also.
Title: Macro Commands
Post by: VerticalMojo on February 06, 2004, 09:28:38 AM
They are Macro buttons! They work great on LT2000. Comes with button images and appears next to your help pull down!  :shock:
Title: Macro Commands
Post by: Kate M on February 06, 2004, 10:25:38 AM
I've got them, actually -- been waiting for some free time to tweak them so I can give them to everybody else in the office -- I'd be a hero. :-)
Title: Macro Commands
Post by: hyposmurf on February 06, 2004, 03:34:52 PM
and maybe you could keep your little secrets to yourself and look oh so much faster than everyone else! :)
Title: Macro Commands
Post by: ronjonp on February 06, 2004, 04:18:46 PM
Quote
anybody know if i could add something to qleader to turn the capslock on. that would be great!


I found this VBA routine for Automatic Caps Lock:

http://www.vbdesign.net/cadpages/files/display.php?page=clocker
Title: Macro Commands
Post by: VerticalMojo on February 06, 2004, 04:19:05 PM
Quote from: hyposmurf
and maybe you could keep your little secrets to yourself and look oh so much faster than everyone else! :)


HA! :lol:
Title: Macro Commands
Post by: Keith™ on February 06, 2004, 04:22:40 PM
Quote from: ronjonp
Quote
anybody know if i could add something to qleader to turn the capslock on. that would be great!


I found this VBA routine for Automatic Caps Lock:

http://www.vbdesign.net/cadpages/files/display.php?page=clocker

Unfortunately no VBA in LT
Title: Macro Commands
Post by: hyposmurf on February 06, 2004, 04:27:47 PM
Quote from: ronjonp
Quote
anybody know if i could add something to qleader to turn the capslock on. that would be great!


I found this VBA routine for Automatic Caps Lock:

http://www.vbdesign.net/cadpages/files/display.php?page=clocker

Theres a AutoCAPS feature in the MTEXT editor,youd just select and CAPS  would always be selected while in CAD.But where is it in CAD 2K4?I know theres a right click,but wheres the old AutoCAPS!
Title: Macro Commands
Post by: Keith™ on February 06, 2004, 04:40:45 PM
Hey Mojo, wanna be a guinea pig for me??
If so, download this (http://www.theswamp.org/lilly.pond/KEB/WhatDWG.exe) and let me know if it works.

Anyone else want to see if it works try it and let me know.

It should grab the name of the AutoCAD drawing currently open AND if it works in LT, then we have a perfect way to implement customization programs in LT. If not, then I'll need to look at something else.
Title: Macro Commands
Post by: VerticalMojo on February 06, 2004, 04:55:07 PM
this is what I get....

Quote
You do not have an appropriate license to use this functionality.
Title: Macro Commands
Post by: hudster on February 06, 2004, 05:15:56 PM
I've downloaded the auto caps lock, but as I have absolutely no experience of VB I don't have a clue how to get this to work, if someone could give me a run through i's be most grateful.
Title: Macro Commands
Post by: daron on February 06, 2004, 05:31:01 PM
Quote from: Hudster
I've downloaded the auto caps lock, but as I have absolutely no experience of VB I don't have a clue how to get this to work, if someone could give me a run through i's be most grateful.


Se7en sent me the clocker.dvb. I've updated it to work with a few more things than mtext. I'll load it on the site and link to it in a few. The things I should warn you about are this. vba does not have an event handler for escape if I remember correctly. Also, this program doesn't have a handler for a person hitting caps lock and leaving it on after hitting ok. In both cases the keyboard will be reversed in how it types cases. It can be frustrating, but all you have to do is double click on a piece of text and hit okay. Problem solved. Now that I've stated a disclaimer, I'll go put it up. BRB



Okay, here (http://theswamp.org/swamp.files/Daron/Clocker.dvb) it is. If you want to save it from Mozilla, right click the link and hit "save link target as...".
Title: Macro Commands
Post by: ELOQUINTET on February 09, 2004, 09:21:49 AM
hey daron the clocker works great for me on dtext and mtext but when i do leaders it doesn't. i triggered it to work once i think by doing some junk mtext before a leader but now it's not doing anything. what's the trick to getting it to work with leaders?
Title: Macro Commands
Post by: daron on February 09, 2004, 10:00:50 AM
Haven't used leaders. Let me have a look to update that portion and I'll see.
Title: Macro Commands
Post by: hudster on February 09, 2004, 10:05:03 AM
It's pretty good, doesn't work with attriubutes either.

If it did that it would be fantastic.

<ost of the guys in my company are using it already.
Title: Macro Commands
Post by: VerticalMojo on February 09, 2004, 10:05:08 AM
Does anybody know the Macro command to open a application in windows?
Title: Macro Commands
Post by: daron on February 09, 2004, 10:44:45 AM
It's updated to work with leaders. Redownload it.
Title: Macro Commands
Post by: ELOQUINTET on February 09, 2004, 11:00:48 AM
hmmm not working on my end daron  :cry:
Title: Macro Commands
Post by: daron on February 09, 2004, 11:15:17 AM
Dan, what do you use to invoke leaders?

Hudster, what do you use to invoke attribute edits.
Here are the calls it currently looks for. I have an EditSingleAttribute lisp that I need to update it for.

Code: [Select]
CommandName = "MTEXT" Or CommandName = "DTEXT" Or _
     CommandName = "ATTEDIT" Or CommandName = "TEXT" Or _
     CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
     CommandName = "EATTEDIT" Or CommandName = "DDEDIT" Or _
     CommandName = "FIND" Or CommandName = "LEADER"


Note: double-clicks work for calls on anything that receive dclicks like eattedit.

BTW, nobody in my office likes it, because of the escape and caps-lock bugs. Would be nice if this were written in c++. Then those events could be fixed.
Title: Macro Commands
Post by: ELOQUINTET on February 09, 2004, 11:20:00 AM
i use qleader daron.
Title: Macro Commands
Post by: hudster on February 09, 2004, 11:35:07 AM
It works when I edit the attribute, but not when I first insert the block from a pull down menu.

Oh, and I use double click to edit blocks.

Still all in all a great wee util.
Title: Macro Commands
Post by: hudster on February 09, 2004, 11:40:11 AM
the macro command to open an application in Autocad is _START.

this one opens the calculator

^C^C_start;C:/I386/calc.exe; :o
Title: Macro Commands
Post by: daron on February 09, 2004, 11:52:16 AM
Quote from: eloquintet
i use qleader daron.

Well, type vbaman, make sure it's loaded there, then hit the ide button and add a commandname="QLEADER". See if that helps.
Title: Macro Commands
Post by: ELOQUINTET on February 09, 2004, 12:01:18 PM
ok daron thanks for bearing with my vba ignorance. i got it goin preesh...
Title: Macro Commands
Post by: daron on February 09, 2004, 12:06:59 PM
If you got it going, you must not be that ignorant.
Title: Macro Commands
Post by: hudster on February 09, 2004, 12:10:08 PM
I added the qleader and insert commands and now both work.

This is now truly a superb little app. 10 out of 10.
Title: Macro Commands
Post by: ELOQUINTET on February 09, 2004, 12:15:08 PM
true true i have a couple brain cells left  :wink:
Title: Macro Commands
Post by: VerticalMojo on February 10, 2004, 09:56:58 AM
I'm trying to tweak this button so that when it positions the attribute the insertion point is true. For some reason my insertion point is not in the place I want it and when I pick a position it's not exactly where I want it placed..... Any Ideas?  :?

Thanks in advance...

Allows the user to rotate the attribute then position it.
*^C^C-ate;YES;;;;\;ANGLE 0;POSITION;\;
Title: Macro Commands
Post by: hudster on February 10, 2004, 10:24:26 AM
I tried this and it seems to go where I want it to go.

It looks like it moves slightly when I move the attribute to an intersection point, but when I draw a line from the insertion point of the attribute it's line is from the intersection point I moved it to. :?   (I hope that made sense).
Title: Macro Commands
Post by: M-dub on February 10, 2004, 01:12:56 PM
Some of these may have already been posted...well I know they were a few months ago...I haven't been in here for a while.   :oops:

1.  Page Setups
Create a drawing called PageSetups.dwg and in it, go to File > Page Setup...
Add a page setup for each print job you could possibly have.  For example,
A-Mono-Landscape
B-Mono-Landscape
D-Mono-Landscape
B-Colour-PDF-Landscape
...and so on...
Save PageSetups.dwg in your AutoCAD/Support directory and try the macro below.
It makes printing and plotting in AutoCAD 2k and later a snap!

^C^C.-PSETUPIN "PageSetups.dwg" "*"

2. Insert Block with Dialog Box
Opens a file dialog box for you to select a block to insert. (The reason for this is to give you a preview...it almost acts as a slide library that way)

^C^C(setq BlockName(getfiled "Select drawing file" "C:/DRAWINGS/" "DWG" 0))(command "-INSERT" BlockName)

3.  Windows Explorer
To open Windows Explorer in the folder containing the current drawing open in AutoCAD:

^C^C(COMMAND ".BROWSER" (GETVAR "DWGPREFIX"))

4.  Change Text Width
CHtext.lsp must be loaded for this macro to function properly.

^C^CCHT;\\;W;\;

5.  Delete Nul Entities and Purge Them
Deletes Nul Entities - Such as empty text strings and empty blocks - Once deleted, blocks must be purged from drawing.  W:\Menus\LSP\Delnul.lsp must be apploaded for this function to work.

^C^CDELNUL;PURGE;

6.  (a)Open ACAD.PGP & (b)Reinitialize it
(a) Opens acad.pgp in Notepad so you can add or change more of your key-ins.

^C^C^P(command"notepad"(findfile"acad.pgp")) ^P

(b) After you make a change to the acad.pgp file, it must be reinitialized for the changes to take place.

^C^C_RE-INIT 16

7.  Global Attribute Edit
The standard AutoCAD attedit command with a bit of it done for you…

^C^Cattedit;N;;;;;\\;
Title: Macro Commands
Post by: ELOQUINTET on February 10, 2004, 01:23:10 PM
can someone give me some help with how to modify my stretch to have ortho turned on before beggining:

$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_stretch,^C^C_stretch)

thanks
Title: Macro Commands
Post by: Spageddie on February 10, 2004, 05:56:42 PM
8) just add orthomode;1; to the begining of the code, to set ortho ON
Title: Macro Commands
Post by: daron on February 10, 2004, 06:02:18 PM
That is in your own menu file, right?
Title: Macro Commands
Post by: ELOQUINTET on February 10, 2004, 06:56:49 PM
mmm no should i add any buttons i customize to my menu. hmmm that a dumb question. i know i should but i'm trying to build a menu for everyone in my office and not sure if they'd use some of my macros. i guess i should add it to mine so if my job goes south i can easily take all my tools with me. i'll give it a try tomorrow thanks guys
Title: Macro Commands
Post by: VerticalMojo on February 16, 2004, 02:10:57 PM
Whats the Macro command for the Osnap toggle? I know snap is ^b.......

Thanks
Title: Macro Commands
Post by: daron on February 16, 2004, 02:44:30 PM
ctrl+f
Title: Macro Commands
Post by: VerticalMojo on February 16, 2004, 02:59:54 PM
Thanks Daron!  :)
Title: Macro Commands
Post by: daron on February 16, 2004, 03:02:23 PM
ctrl+a controls group selectability, if you're interested.
Title: Macro Commands
Post by: 42 on February 16, 2004, 04:09:35 PM
Not if some weasealy wrascal changed it to select all!! I now have a button with pickstyle as a macro.
Title: Macro Commands
Post by: Spageddie on February 16, 2004, 11:33:41 PM
8) Actually Daron,,that is ok for Acad2000 but for Acad2002 onwards it is
CTRL+SHIFT+A to toggle groups on/off
Title: Macro Commands
Post by: daron on February 16, 2004, 11:46:14 PM
Worked on my 2004.
Title: Macro Commands
Post by: Keith™ on February 17, 2004, 06:21:00 AM
I'll have to check that on 2k2 and 2k4 .. I'll report back later..
Title: Macro Commands
Post by: VerticalMojo on February 17, 2004, 09:10:52 AM
on my LT2000 ctrl A is undo!
Title: Macro Commands
Post by: daron on February 17, 2004, 09:52:48 AM
Okay? It worked yesterday. Today, this is the result.
_ai_selall Selecting objects...done. This is after drawing a line.
Title: Macro Commands
Post by: hudster on February 17, 2004, 09:55:33 AM
Undo in most windows based programs is ctrl + z
Title: Macro Commands
Post by: daron on February 17, 2004, 09:59:35 AM
VM, try that ctrl+A thing after drawing a line. If it draws a line, maybe it's one of those keys that just does the previously issued commands.
Title: Macro Commands
Post by: Keith™ on February 17, 2004, 01:51:29 PM
In A2k CTRL+A = Group Toggle
Title: Macro Commands
Post by: daron on February 17, 2004, 02:32:10 PM
Yes, but LT is Undo?
Title: Macro Commands
Post by: VerticalMojo on February 17, 2004, 02:42:04 PM
Okay wait.... I guess my Short keys have been altered.... My CTRL "Z" is unassigned. I tried it on a different computer and CTRL "A" was Select all and CTRL "Z" was undo......
Title: Macro Commands
Post by: VerticalMojo on February 17, 2004, 02:48:57 PM
I set my undo to CTRL Z and took it off CTRL A and it defaults to toggle groups.......
Title: Macro Commands
Post by: Keith™ on February 17, 2004, 04:21:02 PM
I hate it when people modify the standard shortcuts....
Title: Macro Commands
Post by: Spageddie on February 17, 2004, 06:28:28 PM
:x bloody autodesk :x
Title: Macro Commands
Post by: VerticalMojo on March 05, 2004, 11:37:55 AM
I may have asked its question before but I'll try again since there are more people here now..... :keb:

I am trying to get this button to open up the design center and list all the layers of a particular drawing. Catch is, I need them to default to the "List" view...... wondering if anybody could help me out...

Thank ya,

oh yeah this is what I got so far......

^C^C_adcnavigate;H:/Blocks/layers.dwg/layers;^M;;

Using LT2000 NO LISP!

ITS FRIDAY! :sot:
Title: Macro Commands
Post by: M-dub on March 05, 2004, 01:33:26 PM
Don't know if this one's in there, but as with most other programs in Windows, CTRL+Tab will cycle through all files open in a program.  So, if you have a few drawings open in AutoCAD, or a few documents in Word, etc....
Many of you probably already knew this one...
Title: Macro Commands
Post by: ronjonp on March 12, 2004, 11:34:58 AM
Don't know if this one is in there but I always hated when I went to etransmit a drawing it asked me "do you want to save changes?".....simple but brought the stress level way down :D

qsave;^C^C_etransmit
Title: Macro Commands
Post by: VerticalMojo on April 07, 2004, 11:12:13 AM
What is the command for the "up arrow"? I want it to apply the last input from the user..... Is that possible?
Title: Macro Commands
Post by: ronjonp on April 07, 2004, 12:07:22 PM
.zoom;extents;^C^C.MOVE;ALL;;(GETVAR "VIEWCTR");0,0,0;BASE;0,0,0;.zoom;extents;

Made this one for my xrefed details so their insertion point is centered.
Title: Macro Commands
Post by: Mark on April 07, 2004, 12:12:16 PM
Quote from: VerticalMojo
What is the command for the "up arrow"? I want it to apply the last input from the user..... Is that possible?


I kinda thought it was the system variable lastprompt but now I'm not sure.
Title: Macro Commands
Post by: VerticalMojo on April 07, 2004, 12:30:17 PM
Yeah my LT dosent read that command.....  :?
Title: Macro Commands
Post by: Keith™ on April 07, 2004, 12:34:39 PM
The up arrow is supposed to page up through the information entered at the command line. I don't know what holds that information, but lastprompt does not.
Title: Macro Commands
Post by: ELOQUINTET on April 07, 2004, 01:03:46 PM
this is kind of related but i customized some of my keyboard keys. example i made control up arrow be nearest and control down key perpendicular. well ever since then my control c and control v don't work as copy and paste. i've gone back and changed them but it has no effect. how do i get it back???
Title: Macro Commands
Post by: Keith™ on April 07, 2004, 01:12:11 PM
CTRL + V and CTRL + C are windows commands so you will have to set "Windows standard accelerator keys" in the options dialog under the "user preferences" tab
Title: Macro Commands
Post by: ELOQUINTET on April 08, 2004, 01:20:16 PM
ah thanks keith
Title: Macro Commands
Post by: Keith™ on April 08, 2004, 01:21:51 PM
no problem
Title: Macro Commands
Post by: VerticalMojo on April 28, 2004, 02:38:58 PM
Anybody know of a macro that would load up a MNS file in menuload?????

~ :D
Title: Macro Commands
Post by: Keith™ on April 28, 2004, 02:48:14 PM
unfortunately not in LT ... I still can't believe there is no MENU command in LT
Title: Macro Commands
Post by: ronjonp on April 29, 2004, 09:06:06 AM
What about a lisp to load a pulldown menu at startup and place it? I found this one and modified it to the name of my menu but can't get it to work.

Code: [Select]
; Place the menu to the left of the last pulldown already loaded
(defun Aqua_PlaceMenu (/ CNT)
  (setq CNT 1)
  (while (< CNT 24)
    (if (menucmd (strcat "P" (itoa CNT) ".1=?"))
      (setq CNT (1+ CNT))
      (progn
        (if (> CNT 2)
          (setq CNT (1- CNT))
          (setq CNT 2)
        )
        (menucmd (strcat "p" (itoa CNT) "=+AQUA.pop1"))
        (setq CNT 25)
      )
    )
  )
)

(if (not (menucmd "AQUA.ID_AQUA_NEW=?"))
(progn (command "menuload" "AQUA")
(Aqua_PlaceMenu)
)
)

(prompt (strcat "Aqua Menu is now loaded.\n"))
(princ)
Title: Macro Commands
Post by: Keith™ on April 29, 2004, 09:40:10 AM
there is no lisp in LT ....
Title: Macro Commands
Post by: VerticalMojo on April 29, 2004, 12:22:26 PM
Actually there is a way to load an mns file with a macro..........

^C^Cmenuload;C:/YOUR/FILE/NAME.MNS


be sure two have the foward slash like this:

/

if it is like this:

\

it will wait for user input.......
Title: Macro Commands
Post by: ronjonp on April 29, 2004, 01:38:58 PM
Quote
there is no lisp in LT ....


yep.....just wondering why this lisp doesn't work

 :D
Title: Macro Commands
Post by: VerticalMojo on July 01, 2004, 03:34:28 PM
Geeze..... I LOVE this thread....


What can I put in a macro that will select a point without putting in numeric location?

Example: when it asks "select base point".......

I want it to select the base point that the block already contains.....

Any clue?
Title: Macro Commands
Post by: Keith™ on July 01, 2004, 04:21:37 PM
Are you using LT?, you might try this ...

Code: [Select]

osmode 64;copy;\\@


You can also use select to pick an object and lastpoint to retrieve the point but there is no good way of moving that to the command that I know of.

Code: [Select]

osmode 64;select;\\$(getvar, lastpoint)
Title: Macro Commands
Post by: hyposmurf on March 14, 2005, 06:20:48 PM
Use this to set my text/dim layer current when I use my custom MTEXT button.

^C^C-LAYER;S;SML_TEXT;;MTEXT

Use this to set my text/dim layer current when I use my custom QLEADER button.

^C^C-LAYER;S;SML_TEXT;;QLEADER
Title: Macro Commands
Post by: hudster on April 22, 2005, 04:01:33 PM
found this one to toggle between model space and paper space using a button

Code: [Select]
(setvar "tilemode" (- 1 (getvar "tilemode")))

I though it was kinda neat
Title: Macro Commands
Post by: nivuahc on April 22, 2005, 04:10:50 PM
My two favorites:

Code: [Select]
(startapp "C:/windows/explorer.exe" (getvar "DWGPREFIX"))

Opens Explorer in the directory of the drawing you're working on


Code: [Select]
(startapp "C:/Program Files/Mozilla Firefox/firefox.exe" "http://www.theswamp.org/")

This one, I think, doesn't need any explanation.  8)