Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rename layer stb plot styles with another set of stb plot styles

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
288 Views, 5 Replies

Rename layer stb plot styles with another set of stb plot styles

I wrote a scr file which enables me to rename plotstyles, but if the plot style does not exist, it interrupts the rest of the script file and i only know how to modify existing lisp routines.

can anyone direct me or give me some tips as to how to write a short lisp routine that can help me accomplish this task?


Thank you in advance,

Connie


~~~~This is the problem i encounter.

Command: -rename
Enter object type to rename
[Block/Dimstyle/LAyer/LType/Plotstyle/textStyle/Tablestyle/Ucs/VIew/VPort]: p
Enter old plot style name: Solid_10
Old plot style Solid_10 not found.

Enter old plot style name: Solid_047

Old plot style Solid_047 not found.

Enter old plot style name: -rename

Old plot style -rename not found.

~~~~~This is my scr file.
-rename
p Solid_01 Solid_002
-rename
p Solid_02 Solid_005
-rename
p Solid_03 Solid_007
-rename
p Solid_04 Solid_010
-rename
p Solid_05 Solid_012
-rename
p Solid_06 Solid_016
-rename
p Solid_07 Solid_020
-rename
p Solid_08 Solid_028
-rename
p Solid_09 Solid_035
-rename
p Solid_10 Solid_047
-rename
p Solid_11 Solid_062
-rename
p Solid_12 Solid_083
5 REPLIES 5
Message 2 of 6
EC-CAD
in reply to: Anonymous

Try this Lisp approach. (attached, untested)

Bob
Message 3 of 6
Anonymous
in reply to: Anonymous

Bob,


the lisp did not work, but thank you for your assistance.

connie
Message 4 of 6
EC-CAD
in reply to: Anonymous

Connie3000,
The Lisp works. You will need to 'insert' a template
drawing.. with the 'new' plot-styles defined. Or import
them. That will add them to the table of plotstyles..
Then, you can run the attached lisp.. to rename them.

Bob Message was edited by: ECCAD
Message 5 of 6
EC-CAD
in reply to: Anonymous

Second thought.
That doesn't work.
If you have a plotstyle named "Light" and want to rename
it as "Dark" .... Acad complains that it cannot find "Dark"
in the plotstyle dictionary. DAH
If you have a plotstyle named "Dark", and try to rename
"Light" to "Dark" ... Acad complains that "Dark" exists
already. DAH
Then why in the heck does the Rename.. have an option
for renaming PlotStyle ?????????
Go figure.

Bob
Message 6 of 6
Anonymous
in reply to: Anonymous

Bob,

Thank you for your assistance...

Have a good weekend.

Connie

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

Post to forums  

Autodesk Design & Make Report

”Boost