hoowahfun Posted April 19, 2010 Posted April 19, 2010 Hey guys, I wrote a lisp routine and a script that will open drawings and then screen selected architectural layers I have referenced into my sheet. Everything works well, but I have a couple of things I'd like to improve. 1) I currently have each drawing name typed out in my script. Is there a way to tell it to open a directory of files or something similar? Trying to make it more user friendly for other disciplines (time consuming to type each dwg name). 2) Is there a way that I can tell the lisp to select all the layers on the xref of my choosing? Architecture sometimes adds layers and it would be easier to just run it again than to go edit the lisp to add the layer name. They use many, many layers (not all are shown) so it's time consuming. Here's what I have so far: open 53636_M101.dwg layscr close open 53636_M102.dwg layscr close open 53636_M103.dwg layscr close open 53636_M104.dwg layscr close open 53636_M105.dwg layscr close open 53636_M106.dwg layscr close open 53636_M107.dwg layscr close open 53636_M108.dwg layscr close open 53636_M109.dwg layscr close open 53636_M110.dwg layscr close open 53636_M111.dwg layscr close open 53636_M112.dwg layscr close open 53636_M113.dwg layscr close open 53636_M114.dwg layscr close open 53636_M115.dwg layscr close open 53636_M401.dwg layscr close open 53636_M402.dwg layscr close open 53636_P101.dwg layscr close open 53636_P102.dwg layscr close open 53636_P103.dwg layscr close open 53636_P104.dwg layscr close open 53636_P401.dwg layscr close open 53636_P402.dwg layscr close open 53636_P403.dwg layscr close open 53636_P404.dwg layscr close open 53636_P405.dwg layscr close open 53636_P406.dwg layscr close (defun c:layscr () (command "layer" "c" "253" "53636a-fp1|53636-grid" "c" "253" "53636a-fp1|a-area-line" "c" "253" "53636a-fp1|a-cols" "c" "253" "53636a-fp1|a-concrete-wall" "c" "253" "53636a-fp1|a-detl-ligt" "c" "253" "53636a-fp1|a-detl-medm" "c" "253" "53636a-fp1|a-detl-patt" "c" "253" "53636a-fp1|a-door" "c" "253" "53636a-fp1|a-elev-patt" "c" "253" "53636a-fp1|a-eqpm" "c" "253" "53636a-fp1|a-eqpm-ktcn" "c" "253" "53636a-fp1|a-eqpm-ktcn-ovhd" "c" "253" "53636a-fp1|a-flor-case" "c" "253" "53636a-fp1|a-flor-hidd" "c" "253" "53636a-fp1|a-flor-hral" "c" "253" "53636a-fp1|a-flor-iden" "c" "253" "53636a-fp1|a-flor-levl" "c" "253" "53636a-fp1|a-flor-patt" "c" "253" "53636a-fp1|a-furn-syst" "c" "253" "53636a-fp1|a-flor-tptn" "c" "253" "53636a-fp1|a-roof-below" "c" "253" "53636a-fp1|a-roofplan" "c" "253" "53636a-fp1|a-stairs-beyond" "c" "253" "53636a-fp1|a-windows" "c" "253" "53636a-fp1|aswnailr" "c" "253" "53636a-fp1|guttersdownspouts" "c" "253" "53636a-fp1|roofoverhang" "c" "253" "53636a-fp1|s-cols-bubl" "c" "253" "53636a-fp1|s-grid-full" "c" "253" "53636a-fp1|sfscol" "c" "253" "53636a-fp1|ssmcmu" "c" "253" "53636a-fp1|sssang" "c" "253" "53636a-fp1|sssfast" "c" "253" "53636a-fp1|sssgirt" "c" "253" "53636a-fp1|sssgirt" "c" "253" "53636a-fp2|a-flor-patt" "c" "253" "53636a-fp2|a-roof-below" "c" "253" "53636a-fp2|a-wall-prht" "c" "253" "53636a-fp2|a-windows" "c" "253" "53636a-fp2|aswnailr" "c" "253" "53636a-fp2|c-swlk-conc" "c" "253" "53636a-fp2|sfscol" "c" "253" "53636a-fp2|sssang" "c" "253" "53636a-fp1|a-cols" "") (command "purge" "all" "*" "n") (command "audit" "y") (command "zoom" "e") (command "qsave") (princ) ); end of c:layscr Quote
hoowahfun Posted April 19, 2010 Author Posted April 19, 2010 Okay here's the updated part for screening the architectural xref's in all my sheets. Still working on how to open drawings in a directory. (defun c:layscr () (command "layer" "c" "253" "53636a-fp1|*" "c" "253" "53636a-fp2|*" "c" "253" "53636a-fpm|*" "c" "3" "53636a-fpm|s-cols-bubl" "") (command "purge" "all" "*" "n") (command "audit" "y") (command "zoom" "e") (command "qsave") (princ) ); end of c:layscr it's WAY simpler than what i had previously 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.