Layer Change with script, problem with layer that have space

Layer Change with script, problem with layer that have space

razkaman
Enthusiast Enthusiast
1,700 Views
5 Replies
Message 1 of 6

Layer Change with script, problem with layer that have space

razkaman
Enthusiast
Enthusiast

Hi Everybody

 

this is my first post in the forum, hope you all doing well

 

i have a problem with changing layer name trough script

i use perl program to make the script for me

first i make in excell, and save as text(tab delimited)

and using perl to make me a scr

 

my problem is , in the drawing there is so many layer with space in it . example : "alignment name" , "approach slab"

 

because autocad is read space as enter. how i can change layer in autocad that has space , connected maybe with underline or tab ( _ or -)

 

thank you

Raka

0 Likes
Accepted solutions (2)
1,701 Views
5 Replies
Replies (5)
Message 2 of 6

ВeekeeCZ
Consultant
Consultant
Accepted solution
Use quotation marks... for "Your Layer Name".
Message 3 of 6

razkaman
Enthusiast
Enthusiast

thank you for your comment

 

do you the easiest way to make all the old layer name in autocad or in excell so they are all add with quotation marks.

so when i save in txt, they were all in quotation marks

 

thank you

0 Likes
Message 4 of 6

ВeekeeCZ
Consultant
Consultant
Accepted solution

Is that a question if I know?

 

Thats very simple in excel.

 

=""""&A1&""""

...if "Your Layer Name" is in A1 cell.

Message 5 of 6

razkaman
Enthusiast
Enthusiast

thank you very much Sir, now my problem is solved. Smiley Very HappySmiley Very Happy

 

hahaha, sorry i forgot to put "have" in my previous comment.Smiley Tongue

0 Likes
Message 6 of 6

ВeekeeCZ
Consultant
Consultant
Glad that helped you.
Since you're newbie... If your problem is solved, then mark a solution with button. If you like it, give some kudo.