jfurlong Posted August 13, 2009 Share Posted August 13, 2009 be the way once i have made the extra addons i was talking about above i will post up here. Quote Link to comment Share on other sites More sharing options...
JeepMaster Posted August 13, 2009 Share Posted August 13, 2009 so not sure why but one of the earlier lsp that jeepmaster posted that didn't always work in 2008 now always works in 2010 and the lsp that lee mac has always works in 2008. Hmmm...interesting, I don't have 2010 so can't really test it. I guess when our company upgrade to 2010, then I'll need to go back to my old version of my SENT.lsp Lee, do you know what's wrong with the newest version? Here's my current version that you helped rewrite. ;............................................................................... ; ; << Detach unloaded/unresolved xrefs, Bind xrefs, Audit, Purge >> ; << July 2009 >> ; << Version 3.0 >> ; ; NOTE: Must have a blank dwg in search path name "dummy.dwg" ; ;............................................................................... (defun c:sent (/ *error* doc xlst dfile lst OldBindType) (vl-load-com) (defun *error* (msg) (vla-EndUndoMark doc) (if (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n<<< SENT Error: " msg " >>>")) ) (setvar "modemacro" ".") (setvar "bindtype" OldBindType) (setvar "cmdecho" 1) (princ) ); end of *error* (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (vla-StartUndoMark doc) (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......") (setvar "cmdecho" 0) (setq OldBindType (getvar "bindtype")) (setvar "bindtype" 0) (vla-AuditInfo doc :vlax-true) (if (setq dfile (findfile "dummy.dwg")) (if (setq xlst (xstatus)) (foreach xref xlst (if (not (x_bind (car xref) dfile (if (cdr xref) t))) (setq lst (cons (strcat "\n<< XREF: " (car xref)" Failed to Bind >>") lst) ) ) ) (princ "\n<< No XREFs Found >>") ) (princ "\n<< Dummy File Not Found >>") ) (terpri) (prompt "\nPurging RegApps")(terpri) (command "-purge" "R" "*" "N") (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 "bindtype" OldBindType) (setvar "modemacro" ".") (if lst (mapcar 'princ (reverse lst))) (setvar "cmdecho" 1) (vla-EndUndoMark doc) (princ) ); end of sent (defun xstatus (/ tdef elst flag xlst) (while (setq tdef (tblnext "BLOCK" (not tdef))) (cond ((eq 4 (logand 4 (cdr (assoc 70 tdef)))) (setq elst (entget (tblobjname "BLOCK" (cdr (assoc 2 tdef)))) flag (cdr (assoc 70 elst))) (setq xlst (cons (cons (cdr (assoc 2 elst)) (cond ((eq 32 (logand 32 flag)) nil) ((assoc 71 elst) t) (t t))) xlst))))) (reverse xlst) ); end of xstatus (defun x_bind (xNme file flag / xref) (setq blk (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object)))) (if (not (vl-catch-all-error-p (vl-catch-all-apply (function (lambda (/ xref) (setq xref (vla-item blk xNme)) (if flag (progn (vla-put-path xref file) (vla-reload xref))) (vla-Bind xref :vlax-false)))))) t) ); end of x_bind Wow, I didn't know this thread is this popular. Over 12000 views. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 13, 2009 Share Posted August 13, 2009 Jeep, I never tested the version I wrote - but I do have 2010 to test, so shall look into it when I get a minute. Quote Link to comment Share on other sites More sharing options...
jfurlong Posted August 14, 2009 Share Posted August 14, 2009 hey guys, if been doing a bit of tweaking on the lsp, i now have one that seems to work, on 2010 that even saves the file to a new folder, i'll post it up once i'v done a few tests on it. Quote Link to comment Share on other sites More sharing options...
JeepMaster Posted September 22, 2009 Share Posted September 22, 2009 jfurlong, What's the status of your modified lisp? What did you do to make it work for 2010? Quote Link to comment Share on other sites More sharing options...
jfurlong Posted September 23, 2009 Share Posted September 23, 2009 hi jeep, Hi i will post up the scr, lsp later, i have it running from a tool bar now and seems to work every time except for in DWG's that are missing an StmpFX.arx which was made by a 3rd party who are not making one for 2010. Quote Link to comment Share on other sites More sharing options...
JeepMaster Posted October 5, 2009 Share Posted October 5, 2009 I'm actually looking for help to improve my lisp so it will save the bound file to a new folder and not modify the current working file. I'm guessing it'll involve -checking and/or creating a new folder. -saveas to new folder with current name. Quote Link to comment Share on other sites More sharing options...
jfurlong Posted October 5, 2009 Share Posted October 5, 2009 hi this is possible, i will get back to this soon, at the moment i'm too busy trying to crack the slowness of autocad 2010. Quote Link to comment Share on other sites More sharing options...
bugoy202 Posted July 28, 2010 Share Posted July 28, 2010 Save the code below into a file called IssueRoutine.batChange C:\Program Files\AutoCAD Architecture 2008\acad.exe to the path of your acad exe. Then place the IssueRoutine.bat into the same directory as the drawings. To run the routine double click on IssueRoutine.bat Make sure that all instances of CAD are closed before you run the routine. FOR %%V IN (*.DWG) DO START /W "c" "C:\Program Files\AutoCAD Architecture 2008\acad.exe" %%V /nologo /b "C:\IssueRoutine.scr" FOR %%V IN (*.BAK) DO DEL %%V Save the attached script file onto your C:\ Below is the contents of the script file. -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 If you need any help or explanation of this then please ask. Note that your machine will be unusable whilst the script is running, and although it may take a while to process 100 drawings, it is far quicker and less tedious than doing it manually. Cheers hello to LElkins, i cant really quite get the process of running this script or changing the acad.exe path to my acad exe. I am using an autocad 2007 and 2009. Does this script work on both? Please help me on this one.it would be a big help to me.Thanks Quote Link to comment Share on other sites More sharing options...
kam1967 Posted February 8, 2011 Share Posted February 8, 2011 Jeepmaster - I tested the routine and I deleted some xrefs so they are unreferenced. Both your routine and Lee's version do not remove unrfererenced files from the drawings. Any suggestions? Thanks. so not sure why but one of the earlier lsp that jeepmaster posted that didn't always work in 2008 now always works in 2010 and the lsp that lee mac has always works in 2008. Hmmm...interesting, I don't have 2010 so can't really test it. I guess when our company upgrade to 2010, then I'll need to go back to my old version of my SENT.lsp Lee, do you know what's wrong with the newest version? Here's my current version that you helped rewrite. ;...............................................................................;; >; >; >; ; NOTE: Must have a blank dwg in search path name "dummy.dwg" ;;............................................................................... (defun c:sent (/ *error* doc xlst dfile lst OldBindType) (vl-load-com) Quote Link to comment Share on other sites More sharing options...
clyde88 Posted May 24, 2011 Share Posted May 24, 2011 just now saw your information on this vba. I know you removed the link since nobody appreciated your work. Is there anyway I can get a copy of the file. It looks like something I could really use to speed up our process on archiving files. Thanks for your help. Good Afternoon Ladies, Gentleman and children of all ages. Sorry to keep bumping this and not letting the thread die, but I have now adjusted the vba, again, and it will now handle unloaded xrefs, and shouldn't (fingers crossed) throw any error messages. The listbox will now have a horizontal scroll where necessary. Extract the dvb file from the zip. Place the dvb anywhere that you want, on the server if more users need it. Then create a custom button and add the macro ^C^C-vbarun;"dvb location/Prepare.dvb!Start"; where dvb location is the path to the dvb file. Ensure that you use / rather than \ in the file path. Let me know if you have any problems. Cheers Quote Link to comment Share on other sites More sharing options...
sidhu412 Posted October 24, 2011 Share Posted October 24, 2011 Hello LElkins, Thank you very much for sharing such a nice tool. It really works perfectly, I used it in many projects. But it is not working for one specific set of drawing, when i use this tool it shows me this message "Cannot find the specified drawing file. Please verify that the file exists." Can you please guide me what should i have to do to solve this problem. (where i already purged & audit the drawing) Thanks, Asad Quote Link to comment Share on other sites More sharing options...
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.