pharrold Posted September 8, 2010 Posted September 8, 2010 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 Quote
pharrold Posted September 8, 2010 Author Posted September 8, 2010 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. Quote
ReMark Posted September 8, 2010 Posted September 8, 2010 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? Quote
pharrold Posted September 8, 2010 Author Posted September 8, 2010 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! Quote
ReMark Posted September 8, 2010 Posted September 8, 2010 (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 September 8, 2010 by ReMark Quote
pharrold Posted September 8, 2010 Author Posted September 8, 2010 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] : Quote
ReMark Posted September 8, 2010 Posted September 8, 2010 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? Quote
pharrold Posted September 8, 2010 Author Posted September 8, 2010 yes, i could use userR to rename the layer to 033.1 but how do i go about applying that to my script? Quote
ReMark Posted September 8, 2010 Posted September 8, 2010 -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 Quote
pharrold Posted September 9, 2010 Author Posted September 9, 2010 Thanks for the help, this will work great. Quote
Recommended Posts
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.