Custom Macro Crashing AutoCAD LT ... sometimes

Custom Macro Crashing AutoCAD LT ... sometimes

seedstudiolandscapedesign
Enthusiast Enthusiast
1,987 Views
27 Replies
Message 1 of 28

Custom Macro Crashing AutoCAD LT ... sometimes

seedstudiolandscapedesign
Enthusiast
Enthusiast

I have a custom macro that I use to set the proper draw order of a standard set of layers in each of my drawings.  About half the time, this macro will crash AutoCAD.  Every drawing has the same set of layers, so I am at a loss as to what could be setting off the crash occasionally.

 

I've posted the macro here and would appreciate any assistance in debugging.

 

^C^Cexpert;1;;^C^C-La;A;d;temp;s;temp;;;;GRAPHSCR;-layer;thaw;"l-hardscape-hatch";;-layer;set;l-hardscape-hatch;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-water;set;l-water;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-mulch;set;l-mulch;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-features-hatch;set;l-features-hatch;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-fines;set;l-fines;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-lawn;set;l-lawn;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-stone;set;l-stone;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;-render;set;-render;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;-calcs;set;-calcs;freeze;*;;_select;_auto;all;;draworder;previous;;back;-la;thaw;l-pl-groundcover;set;l-pl-groundcover;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-groundcover-e;set;l-pl-groundcover-e;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-furniture;set;l-furniture;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-features;set;l-features;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-shrubs;set;l-pl-shrubs;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-label;set;l-pl-label;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-shrubs-e-shade;set;l-pl-shrubs-e-shade;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-shrubs-e;set;l-pl-shrubs-e;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-trees;set;l-pl-trees;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-trees-e-shade;set;l-pl-trees-e-shade;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;thaw;l-pl-trees-e;set;l-pl-trees-e;freeze;*;;_select;_auto;all;;draworder;previous;;front;-la;a;r;temp;;;re;
0 Likes
1,988 Views
27 Replies
Replies (27)
Message 21 of 28

seedstudiolandscapedesign
Enthusiast
Enthusiast

Hi Maxim,

 

I've been working with the TEMP Layer State a bit.  In my template files I deleted the existing TEMP Layer State, did a full Purge and made a fresh one, and so far that has been mostly crash free.  I will have to test more to know for sure.  I did delete the TEMP Layer State and ran the macro without it, it did not crash however it stopped midrun and the command line was asking for a layer name. 

 

On an older file similar to those i have been working with, the crash occured and this time the log file showed the crash occuring before it got to the TEMP Layer State.  I posted the log file contents below if you have any feedback on it.

 

 

[ AutoCAD LT - Tue Apr 11 12:28:28 2017  ]----------------------------------------

Opening an AutoCAD LT 2013/AutoCAD 2013 format file.
Substituting [simplex.shx] for [archquik.shx].
Regenerating model.


Command: 

Autodesk DWG.  This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.

Command: 

Command: 
Command: 
Command: 
Command: expert

Enter new value for EXPERT <1>: 1

Command: 
EXPERT

Enter new value for EXPERT <1>: *Cancel*

Command: 
Command: -La
0 Likes
Message 22 of 28

maxim_k
Consultant
Consultant
Can you attach here the file which crashes AutoCAD when you run the macro?
Or you can send it to my email.

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes
Message 23 of 28

seedstudiolandscapedesign
Enthusiast
Enthusiast

The one I sent you before will set off the crash when I run the macro.  I can send you a different one if that would be helpful, but they are all pretty much the same.

0 Likes
Message 24 of 28

maxim_k
Consultant
Consultant
Yes, please, send me another one.
Do you open the drawings from the local drive?

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes
Message 25 of 28

maxim_k
Consultant
Consultant
I tried your macro with the file you sent me previously - no go.
I still cannot reproduce the crash on my side.
There should be some additional conditions which I haven't on my system.

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes
Message 26 of 28

seedstudiolandscapedesign
Enthusiast
Enthusiast

Hi Maxim,

 

I open the files from the local hard drive.  I just emailed you another file that crashed using the macro yesterday. 

0 Likes
Message 27 of 28

maxim_k
Consultant
Consultant
Received it

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes
Message 28 of 28

maxim_k
Consultant
Consultant
Hi,

I tried the drawing you send me yesterday and was not able to reproduce the crash.

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes