Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rename dimstyle with spaces in name using script

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
394 Views, 4 Replies

Rename dimstyle with spaces in name using script

I need help writing a script file to rename dimension styles that have spaces in them.

I tried using:

-rename;dimstyle;"DIM 1-8";DIM_1-8;

and that didn't work.

I also tried:
-rename;dimstyle;DIM 1-8;DIM_1-8;
but the "spaces in the dimstyle name are interpreted as "returns"

I also have some dimstyles with an ' in the name (i.e. Dim 1-3')

Any help is appreciated.

Tom
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

You will have to do it manually.

--
Dean Saadallah
http://www.pendean.com
LT Express Utilities
http://www.pendean.com/ltexpress
Expanded Links Pages
http://www.pendean.com/lt/links.htm
--

"tomdinmn" wrote in message
news:f12deef.-1@WebX.maYIadrTaRb...
> I need help writing a script file to rename dimension styles that have
spaces in them.
> I tried using:
>
> -rename;dimstyle;"DIM 1-8";DIM_1-8;
>
> and that didn't work.
>
> I also tried:
> -rename;dimstyle;DIM 1-8;DIM_1-8;
> but the "spaces in the dimstyle name are interpreted as "returns"
>
> I also have some dimstyles with an ' in the name (i.e. Dim 1-3')
>
> Any help is appreciated.
>
> Tom
>
Message 3 of 5
Anonymous
in reply to: Anonymous

Thanks Dean.

That wasn't the answer I was hoping for, but I figured the spaces in the dimstyle names would pose a problem that couldn't be overcome in a script. I'll have to move on to plan B. Do you know if the full version of ACAD 2002 can handle problems like this with the standards manager? We run a mix of Full/LT seats so I may upgrade the Fulls to 2002 and assign the dimstyle fix problem to the Full users.

Tom
Message 4 of 5
Anonymous
in reply to: Anonymous

It should as it is more robust than scripts, but I have not tried it.

--
Dean Saadallah
http://www.pendean.com
LT Express utilities
http://www.pendean.com/ltexpress
Expanded Links Pages
http://www.pendean.com/lt/links.htm
--

"tomdinmn" wrote in message
news:f12deef.1@WebX.maYIadrTaRb...
> Thanks Dean.
> That wasn't the answer I was hoping for, but I figured the spaces in the
dimstyle names would pose a problem that couldn't be overcome in a script.
I'll have to move on to plan B. Do you know if the full version of ACAD 2002
can handle problems like this with the standards manager? We run a mix of
Full/LT seats so I may upgrade the Fulls to 2002 and assign the dimstyle fix
problem to the Full users.
>
> Tom
>
Message 5 of 5
Anonymous
in reply to: Anonymous

I don't have any trouble changing a dim style with spaces to one without via
script or menu macro using LT 2002. Single quotes were no problem either.
Are you using a previous version?

For script:
-rename dimstyle "Dim style with spaces" NewName
For macro:
-rename;dimstyle;"Dim style with spaces";NewName;

Your message implies that you are trying to use ;'s in a script for enters,
which is not supported. Scripts are only interpreted enough to pass the
statements to the command line as opposed to menu macros which allow escape
characters, diesel, etc.

Now of course using scripts/macros assumes you will already know the names
you want to change. If you want something to determine whether a name has
spaces and/or quotes and change it accordingly, then you will need a little
lisp and use full AutoCAD to run it or get an add-on to enable lisp in LT.

Aubrie


"tomdinmn" wrote in message
news:f12deef.-1@WebX.maYIadrTaRb...
> I need help writing a script file to rename dimension styles that have
spaces in them.
> I tried using:
>
> -rename;dimstyle;"DIM 1-8";DIM_1-8;
>
> and that didn't work.
>
> I also tried:
> -rename;dimstyle;DIM 1-8;DIM_1-8;
> but the "spaces in the dimstyle name are interpreted as "returns"
>
> I also have some dimstyles with an ' in the name (i.e. Dim 1-3')
>
> Any help is appreciated.
>
> Tom
>

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

Post to forums  

Autodesk Design & Make Report

”Boost