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

Automatic Rename for Linetype, including xref!

3 REPLIES 3
Reply
Message 1 of 4
hugonascimento
432 Views, 3 Replies

Automatic Rename for Linetype, including xref!

Hi,

1. Context:

We started a project which is going through several scale types (1/100; 1/200; 1/20; 1/5; etc).

We use intensively XREF, and we've done a mistake - we used specific .lin for each drawing scale.

Instead of performing and instructing everyone to use a single template, with a single .lin scale.

AutoCAD 2007, 2008 SP1


2. This causes:

Main File
Xref1| --50_DASHED
Xref2| --100_DASHED
Xref3| -- 200_DASHED


3. Requirement

We want to override or rename all linetypes to a standard linetype name (--100_linetype).

Apllied to all files in several directories.

Just like the Autodesk "Scale List Cleanup Utility" is able to perform (http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=11062617&linkID=9240617).

i.e.
--50_DASHED to --100_DASHED
--200_DASHED to --100_DASHED
and so on...



4. I've searched and anything doesn't seem to work:

4.1. CAD Standards, but doesn't seem to work
4.2. Script Pro from http://cadecorner.blogspot.com/2006/08/layer-translator.html
4.3. Swap Lisp from http://discussion.autodesk.com/forums/thread.jspa?messageID=6161210&#6161210.
This last one looked promising but didn't do anything.
4.4. Other Lisps packages...

5. Please note, i'm newbie at lisps...

6. Is it possible?

Rename, Swap, Translate? I'm lost!!!

I only want "my linetype 50,20,10, etc" to transform to "my linetype"
Is it possible to make it as a filter? like using "*" i.e. *--20_ or *--50_

Thank Your very much!
I hope i wasn't messy.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: hugonascimento

If I understand your question correctly, I think it can be done.

For instance, if an xref layer has a linetype like this "xrefname|HIDDEN2" that could
be changed to simply "HIDDEN2" within the active file.

Joe Burke
Message 3 of 4

Hi.

I know it can be done manually in each file.

But what i was asking was: Can it be done automatically? Like a script to run in all the files? To avoid waisting time...

thank you.
hugo
Message 4 of 4
cadee
in reply to: hugonascimento

Check webpage:- http://discussion.autodesk.com/thread.jspa?messageID=5052412 and check "bylayer2(2),lsp for a similar problem. Change the lisp program for old linetypes (3 0ff) eg. "Center 1_4_" and new linetypes (3 off) eg. "CENTER", if it doesn't work maybe the new linetype has to be loaded in drawing. I've used it for linetypes within blocks.

Hope it helps

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

Post to forums  

Autodesk Design & Make Report

”Boost