Jump to content

Recommended Posts

Posted

i am running AutoCAD LT 2006 and would like to know a way of changing to a layer that contains a string vaule?

 

thanks in advance

Posted

yes, via a script,

 

i have a script to change to a layer and then plot that layer.

 

but some of the layers are named like '033+BORDER' and so can not use useri1-5.

Posted

Your question now looks vaguely familiar. Did you ask this before and not get any responses or none that would work? It's the inclusion of the plus sign that screws things up right?

Posted

Yeah i asked before and the response was to use users1-5 but i cant because of AutoCAD LT.

 

The plus sign and also i think because it has text in.

 

Would be great if i could do this!

Posted (edited)

Forgetting the plus sign for a moment I would not expect to have a script balk at a layer that was "named" versus one that was "numbered". It wouldn't make any sense.

 

You say you want to change to a layer then plot it. What are you doing with all the other layers? Are you turning them off or freezing them before you plot?

 

Currently, in your script, how are you changing to a particular layer? What command are you using and what are your inputs?

Edited by ReMark
Posted

The layer is entered, but it is only a number, the reason for having the +BORDER is because it has a bigger title block than a layer with just numbers.

 

;Command: useri1

USERI1

;Enter new value for USERI1 :

033

;Command: -layer

-LAYER

;[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

T

;Enter name list of layer(s) to thaw: *

*

;[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

S

;Enter layer name to make current or

033

;[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

F

;Enter name list of layer(s) to freeze or

*

;[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

T

;Enter name list of layer(s) to thaw: 0

0

 

;Command: -plot

-PLOT

;Detailed plot configuration? [Yes/No] :

 

;Enter a layout name or [?] :

 

;Enter a page setup name :

 

;Enter an output device name or [?] :

 

;Write the plot to a file [Yes/No] :

 

;Save changes to page setup [Yes/No]? :

 

;Proceed with plot [Yes/No] :

Posted

So really the problem is where you try to enter a new value for USERI1 and find the input isn't accepted because of the plus sign. I'm sure AutoCAD would not have a problem setting the current layer to 033+BORDER.

 

Couldn't you use the script to temporarily rename any layer with a plus sign in its name to something less troublesome? You're not saving the drawing after you plot it right?

Posted

yes, i could use userR to rename the layer to 033.1 but how do i go about applying that to my script?

Posted

-rename

LA (for layer)

033+BORDER (the old name)

033.1 (the new name)

 

I've got to be on the road shortly so I'll have to leave this for now. I'll try checking back in later in the day (well...it will be evening for me).

 

Time now: 2:07 pm EST

Posted

Thanks for the help,

 

this will work great.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...