pharrold Posted July 19, 2010 Posted July 19, 2010 Hi, I have a script that will plot layers automatically without me going into layer manager and changing them and then clicking plot. The drawings i will be working with are electrical, they have many layers in one drawing. the layers are not sequentially numbered so makes the script harder to produce. In theory i wanted a vB program were i have check boxes of the layeers and then the layers checked are pasted into the script. Has anyone got any ideas? the script is as follows: ;BEGIN SCRIPT ;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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 002 002 ;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 : 002 002 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 003 003 ;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 : 003 003 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 005 005 ;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 : 005 005 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 006 006 ;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 : 006 006 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 010 010 ;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 : 010 010 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 012 012 ;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 : 012 012 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 013 013 ;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 : 013 013 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 014 014 ;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 : 014 014 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 015 015 ;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 : 015 015 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 016 016 ;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 : 016 016 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 017 017 ;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 : 017 017 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 018 018 ;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 : 018 018 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 019 019 ;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 : 019 019 ;[?/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] : ;Command: useri1 USERI1 ;Enter new value for USERI1 : 021 021 ;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 : 021 021 ;[?/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] : ;END SCRIPT Quote
BIGAL Posted July 21, 2010 Posted July 21, 2010 I would write a vba or lisp a simple 1 would be just step through the layer table and answer y or n then it would write a script answer to turn off the unwanted. You could populate a list with layer names and have a remove/add button as you pick in a dcl or form then press ok to finish. You can also create layer groups and save, say all currently "on" within the normal layer manager. Also current layer 1 line (setvar "clayer" 019) this is ok in scripts even though its lisp 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.