Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loading updated script file with revised descriptions

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
482 Views, 3 Replies

Loading updated script file with revised descriptions

I've created a script to load layers with custom linetype, description etc. into a new drawing.  I got the script to run just fine but now we've changed some of the descriptions and I want to update a drawing with the new descriptions.  When I load the updated script it asks me "Replace existing description? Yes/No:" If I click yes it doesn't run the updated script witht the new descriptions.  It gives me the -layer prompt at the command line and wants me to type it in.  I have about 150 layers and I want it to update all the layer descriptions with the new script file.

Any help is appreciated.

Thanks

3 REPLIES 3
Message 2 of 4
dmfrazier
in reply to: Anonymous

It would be very helpful if you could post a copy of your script.

I suspect your script is written assuming the new drawing has none of the stuff it sets up, so it works just fine when that's true.

However, the script would have to be written differently if it is going to change existing stuff.

You might need two different scripts, but there's no way to know for sure without seeing the script.

Message 3 of 4
Anonymous
in reply to: dmfrazier

Yes, you are correct it works just fine when starting a new drawing.  I've attached the script (copy_NCSU_UTIL_layers_final) and custom linetypes (cpy_UTIL_CustomLayers) I've created up to this point. 

 

 

Message 4 of 4
Ajilal.Vijayan
in reply to: Anonymous

The script fails at the line where AutoCAD asks "Replace existing description? Yes/No:".

And there is no response from script,.

 

One workaround will be delete all the descriptions and run the script again.

To delete all the descriptions from existing layers do the following.

 

At the command line enter -LAYER

and D and do not enter anything while asking for layer description.

and apply to the layers *UTIL*

See the image in here

Spoiler
Capture.JPG

 

Once the descriptions are deleted, try to run the script again.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost