PDA

View Full Version : Problems with running menu macro.



mikeevans
2004-12-03, 01:12 PM
I have written a menu macro for Autocad that basically saves the current file as a R2000 format drawing to send to external clients.

-----------------------------------------------
ID_ISSUE [SAVE DRAWING FOR ISSUE]^C^CUNDO;MA;TILEMODE;0;ZOOM;E;ZOOM;.95XP;SPELL;ALL;;-XREF;RE;*;-XREF;BIND;*;-purge;all;*;n;;all;*;n;;all;*;n;FILEDIA;0;SAVEAS;2000;;Y;FILEDIA;1;"MADE_MISTAKE?TYPE_'UNDO'_'BACK'_TO_RESTORE"
-----------------------------------------------
The problem i'm having is that sometimes after using this macro the saveas dialogue no longer displays the R2004/2 formats instead displaying a dwg, dwf format. This only resets when I restart the appliaction. Also I sometimes get a dysfunctional Xref command, so that when you envoke 'xref' nothing happens. Can anyone find something wrong or a reason for this strange occurrence and a fix for it??

Also does anyone know of a variable that allows you to snap to Hatching in R2005? In previous versions you were able to snap onto hatching but it does not allow for it any more.

mjfarrell
2004-12-03, 03:09 PM
To enable snapping to your hatch objects
OPTIONS> Selection Tab> Associative Hatches.

Mike.Perry
2004-12-05, 11:42 PM
Hi


Also I sometimes get a dysfunctional Xref command, so that when you envoke 'xref' nothing happens.
What happens if you type _.Xref at the AutoCAD command line?



Also does anyone know of a variable that allows you to snap to Hatching in R2005? In previous versions you were able to snap onto hatching but it does not allow for it any more.
Take a look at the system variable OSnapHatch

Setting it to 1 restores behaviour to AutoCAD 2004 and previous releases.

Have a good one, Mike

tuomo.jarvinen
2004-12-07, 08:34 PM
I tried Your macro - had to remove one "Y;" to make it work:

ID_ISSUE [SAVE DRAWING FOR ISSUE]^C^CUNDO;MA;TILEMODE;0;ZOOM;E;ZOOM;.95XP;-XREF;RE;*;-XREF;BIND;*;-purge;all;*;n;;all;*;n;;all;*;n;FILEDIA;0;SAVEAS;2000;;FILEDIA;1;"MADE_MISTAKE?TYPE_'UNDO'_'BACK'_TO_RESTORE"

Probably this is not the reason for the phenomenoms mentioned, though. We use "etransmit" when sending files to customers (AutoCad 2002).

mikeevans
2004-12-21, 02:02 PM
tuomo, The "Y" was to answer the "do you want to overwrite this file" else the macro will end and will not re set the filedia value to 1.

Mike, I have had a go, if I type _xref it still does not work. The only option is to close down and re-start.
It does not seem to like anything to do with the Xref command as style has also gone.

I think it is something to do with the change of Release format as after getting this error, when you use the command line (forced through filedia) it no longer supplies the different formats instead just "autocad drawing" see below.

((Command: saveas AutoCAD DrawingAutoCAD Drawing
Save drawing as ))

I'm a bit baffled.. I don't know why this is happening. if only there was a -saveas command avaliable on the command line with LT/2005. I do like the Etransmit function but it's not avaliable on the command line and reacts differently in LT2004.


Regards.. Mike.