Guest LElkins Posted February 28, 2008 Posted February 28, 2008 Just so you know, I am a new/casual user. I tried the process, but when it opened the first file it stopped. It is just sitting there. Am I missing something? hi rkohan, Can you please be a bit more specific as to which routine you are using. The .scr file? the vba? Cheers Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 I am using the .scr. Seems like it would do what I needed. I tried it again and it opens the file, refreshes the screen with everything lightened up, then sits there until I push the close "X" in the right hand corner and moves to the next file. It doesn't seem like it is doing anything. Again, please excuse my ignorance, we just switched over from MicroStation 3 months ago. Quote
Guest LElkins Posted February 28, 2008 Posted February 28, 2008 OK. I assume then that you are running it using the .bat file that was with the .scr? Have you ammended this at all? Cheers Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 Just what was in the original post. Changed to our acad.exe path. Quote
saiman Posted February 28, 2008 Posted February 28, 2008 rkohan, check your script file to see if you hit enter after quit:D happen to me too, forgot to add it:oops: erik_NL any word on the Flatten command? Quote
erik_NL Posted February 28, 2008 Posted February 28, 2008 erik_NL any word on the Flatten command? it's flat ???? Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 (edited) I tried adding the enter to the .scr after quit, but it still stops at a lightened version of the file. I copied what was typed in an pated it below. Any ideas? Customization file loaded successfully. Customization Group: ACAD Customization file loaded successfully. Customization Group: CUSTOM Customization file loaded successfully. Customization Group: VAULT Customization file loaded successfully. Customization Group: EXPRESS Opening an AutoCAD 2007 format file. Resolve Xref "2051bdr": O:\51205100\Borders\2051bdr.dwg "2051bdr" loaded. Resolve Xref "2051amf2": O:\51205100\Arch\2051amf2.dwg "2051amf2" loaded. Xref "XXXXbdr": O:\New Project Template\Borders\XXXXbdr.dwg "XXXXbdr" is unreferenced and has been purged. Regenerating layout. Regenerating model. AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc. AutoCAD menu utilities loaded. Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application. Command: -purge Enter type of unused objects to purge [blocks/Dimstyles/LAyers/LTypes/MAterials/Plotstyles/SHapes/textSTyles/Mlinestyl es/Tablestyles/Visualstyles/Regapps/All]: all Enter name(s) to purge <*>: * Verify each name to be purged? [Yes/No] <Y>: n No unreferenced blocks found. No unreferenced layers found. No unreferenced linetypes found. No unreferenced text styles found. No unreferenced shape files found. No unreferenced dimension styles found. No unreferenced mlinestyles found. Deleting plotstyle "Solid". 1 plotstyle deleted. No unreferenced table styles found. No unreferenced materials found. No unreferenced visual styles found. Enter BACKSPACE to interrupt script. Command: audit Fix any errors detected? [Yes/No] <N>: y Auditing Header Auditing Tables Auditing Entities Pass 1 Pass 1 1300 objects audited Auditing Entities Pass 2 Pass 2 1300 objects audited Auditing Blocks 225 Blocks audited Total errors found 0 fixed 0 Erased 0 objects Command: -xref Enter an option [?/Bind/Detach/Path/Unload/Reload/Overlay/Attach] <Attach>: b Enter xref name(s) to bind: * Regenerating layout. Regenerating model. Command: -purge Enter type of unused objects to purge [blocks/Dimstyles/LAyers/LTypes/MAterials/Plotstyles/SHapes/textSTyles/Mlinestyl es/Tablestyles/Visualstyles/Regapps/All]: all Enter name(s) to purge <*>: * Verify each name to be purged? [Yes/No] <Y>: n No unreferenced blocks found. No unreferenced layers found. No unreferenced linetypes found. No unreferenced text styles found. No unreferenced shape files found. No unreferenced dimension styles found. No unreferenced mlinestyles found. No unreferenced plotstyles found. No unreferenced table styles found. No unreferenced materials found. No unreferenced visual styles found. Command: audit Fix any errors detected? [Yes/No] <N>: y Auditing Header Auditing Tables Auditing Entities Pass 1 Pass 1 2100 objects audited Auditing Entities Pass 2 Pass 2 2100 objects audited Auditing Blocks 225 Blocks audited Total errors found 0 fixed 0 Erased 0 objects Command: -layer Current layer: "Symb" Enter an option [?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock /stAte]: lock Enter name list of layer(s) to lock or <select objects>: * Enter an option [?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock /stAte]: zoom Invalid option keyword. Enter an option [?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock /stAte]: *Cancel* Edited October 24, 2011 by SLW210 Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 Huh? I'm lost. Remember, I',m new. In Microstation V* there is a command that does all of this. AutoCAD is a foreign language for me that I am just learning. Sorry Quote
saiman Posted February 28, 2008 Posted February 28, 2008 try adding (enter) before the zoom:D [?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock /stAte]: ((enter)) zoom Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 I am still getting the same result. Pretty soon I may have to do the files (49) one by one. Any help would be appreciated. Thanks Quote
erik_NL Posted February 28, 2008 Posted February 28, 2008 I am still getting the same result. Pretty soon I may have to do the files (49) one by one. Any help would be appreciated. Thanks as far as i see; you really do have to add an enter ( not the brackets ! ) edit1 you'r using the script from page 4 ???? -purge all * n audit y -xref b * -purge all * n audit y -layer lock * zoom Extents tilemode 0 mview l on all pspace zoom extents qsave quit - i did add a enter. So just copy and past. one enter after quit ( last line )( one enter and only one ) when copy and pasting ! No testing facilities at the moment. Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 I did ad the enter. Still no luck. I was just looking at the autocad command printout that I included. at the last 2 keyins: second to last:zoom is keyed in but not an option therefore an invalid option keyword, last keyin, no keyin is typed in but canceled. Is there something missing here? I don't know what I/.scr should be typing in? Quote
erik_NL Posted February 28, 2008 Posted February 28, 2008 I did ad the enter. Still no luck. I was just looking at the autocad command printout that I included. at the last 2 keyins: second to last:zoom is keyed in but not an option therefore an invalid option keyword, last keyin, no keyin is typed in but canceled. Is there something missing here? I don't know what I/.scr should be typing in? it's wrong with the layer command. layer ;rem-layercommand lock ;rem-lock layers * ;rem-all layers ;rem-here a enter to exit the layer command zoom ;rem-here sequence for other commands etc etc etc That should do the trick. was trying to add spaces to clearify the lines but that wouldn't work. so i added ;rem- you can also type it in at your commandline, you can see what is happening. otherwise; do paste your code again here. Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 (edited) I ran all of the key in commands manually on a dummy file and it still has xrefs. Here is what I am using: [font=Courier New]-purge[/font] [font=Courier New]all[/font] [font=Courier New]*[/font] [font=Courier New]n[/font] [font=Courier New]audit[/font] [font=Courier New]y[/font] [font=Courier New]-xref[/font] [font=Courier New]b[/font] [font=Courier New]*[/font] [font=Courier New]-purge[/font] [font=Courier New]all[/font] [font=Courier New]*[/font] [font=Courier New]n[/font] [font=Courier New]audit[/font] [font=Courier New]y[/font] [font=Courier New]-layer[/font] [font=Courier New]lock[/font] [font=Courier New]*[/font] [font=Courier New]zoom[/font] [font=Courier New]Extents[/font] [font=Courier New]tilemode[/font] [font=Courier New]0[/font] [font=Courier New]mview[/font] [font=Courier New]l[/font] [font=Courier New]on[/font] [font=Courier New]all[/font] [font=Courier New]pspace[/font] [font=Courier New]zoom[/font] [font=Courier New]extents[/font] [font=Courier New]qsave[/font] [font=Courier New]quit[/font] Can you edit it for me. I'm just not understanding you. Dense I guess. Edited October 24, 2011 by SLW210 Quote
rkohan Posted February 28, 2008 Posted February 28, 2008 OK. I got it to run. The problem is, it isn't binding the drawings. I copied all of the drawings into a seperate Issued drawings folder, copied the issueroutine.bat there and double clicked it. It ran through every file but when it was done and I opened the drawings, they still had references. Did the program put them somewhere else? Am I missing something? Quote
Guest LElkins Posted February 28, 2008 Posted February 28, 2008 rkohan, Do you have any unloaded xrefs, unreferenced or nested? If you do then it won't bind the xrefs. Cheers Quote
JeepMaster Posted February 29, 2008 Posted February 29, 2008 I went through that a while back and came up with this AWSOME lisp to Detach/Audit/bind/Purgeall. It can handle nested, unloaded, and unresolved xrefs. You MUST put a blank dwg named dummy.dwg in one of your search path folder for it to work. See my thread here: http://www.cadtutor.net/forum/showthread.php?t=13141 (defun C:SENT ( / ) (defun *error*(msg) (setvar "modemacro" ".") (setvar "bindtype" oldBnType) (setvar "cmdecho" 1) (princ "\n...Audit/Bind/PurgeAll terminated!!! ") (princ) ); end of *error* (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......") (setvar "cmdecho" 0) (prompt "\n--- Audit/Bind/PurgeAll......please wait---") (prompt "\nAuditing...")(terpri) (command "_audit" "y") (bind_xrefs) (prompt "\nPurging #1")(terpri) (command "-purge" "a" "*" "N") (prompt "\nPurging #2")(terpri) (command "-purge" "a" "*" "N") (prompt "\nPurging #3")(terpri) (command "-purge" "a" "*" "N") (prompt "\n--- Audit, Bind, PurgeAll completed! ---") (setvar "modemacro" ".") (setvar "cmdecho" 1) (princ) ); end of c:sent (defun bind_xrefs ( / CMD) (setq oldBnType(getvar "bindtype")) (setq CMD (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setvar "bindtype" 0) (setq XLIST (xref-status)) (if XLIST (progn (prompt "\nBinding all Xrefs...") (foreach n XLIST (rem-xref n)) (command "-xref" "b" "*" ) (prompt "...done")(terpri) ) ) (setvar "CMDECHO" CMD) (setvar "bindtype" oldBnType) (princ) ) (defun rem-xref ( XL / XNAME XSTATUS ) (setq XNAME (nth 0 XL)) (setq XSTATUS (nth 2 XL)) (if (= XSTATUS "UNLOADED") (rem_unload) ) (if (= XSTATUS "UNRESOLVED") (rem_unload) ) ) (defun xref-status ( / d n f r) (while (setq d (tblnext "block" (null d))) (cond ( (eq 4 (logand 4 (cdr (assoc 70 d)))) (setq d (entget (tblobjname "block" (cdr (assoc 2 d)))) n (cdr (assoc 2 d)) p (cdr (assoc 3 d)) f (cdr (assoc 70 d)) ) (setq r (cons (list n p (cond ( (eq 32 (logand 32 f)) "LOADED") ( (assoc 71 d) "UNLOADED") ( t "UNRESOLVED") ) ) r ) ) ) ) ) (reverse r) ) (defun rem_unload ( / ) (setq DFILE (findfile "dummy.dwg")) (if (not DFILE) (prompt "\nCannot find dummy_xref drawing ") (progn (command "-xref" "p" XNAME DFILE) (command "-xref" "r" XNAME) ) ) ) Try my lisp to see if it helps. Quote
rkohan Posted February 29, 2008 Posted February 29, 2008 Thanks for all the help. But I need to know how to run this code. Can you give me a step by step? Remember, I'm new. Quote
erik_NL Posted February 29, 2008 Posted February 29, 2008 Thanks for all the help. But I need to know how to run this code. Can you give me a step by step? Remember, I'm new. The code above; put this code in a file ( just like the other one ). This file has to end with .lsp load it in acad with appload run it with sent in autocad. 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.