CAD_Noob Posted August 4, 2022 Posted August 4, 2022 (edited) Looking for a faster way to accomplish this task. When giving out drawings to client, we normally send Binded Drawings and Unbinded Drawings using the AutoCAD E-Transmit command using two options which is the BIND and Unbind saved in a separate folder Aside from this we also send same set of Drawings in PDF format. Do you guys know any faster way of doing this? Normally it takes us days to do these 3. Edited August 5, 2022 by CAD_Noob Quote
mhupp Posted August 5, 2022 Posted August 5, 2022 How big are your files? I don't see how those processes take that long. Quote
CAD_Noob Posted August 5, 2022 Author Posted August 5, 2022 3 hours ago, mhupp said: How big are your files? I don't see how those processes take that long. Around 5mb or more...but need to process a hundred drawings sometimes more. for the PDF I sometimes use the Auto-Publish. the BIND and UNBIND options are my main concern Quote
Emmanuel Delay Posted August 5, 2022 Posted August 5, 2022 Can you describe exactly what do you want with unbind? Quote
CAD_Noob Posted August 5, 2022 Author Posted August 5, 2022 20 minutes ago, Emmanuel Delay said: Can you describe exactly what do you want with unbind? We use E-Transmit command, and under Transmittal Setup > Modify, under Actions we uncheck the "Bind External References" for the Path Options, we use the "Use organized folder structure" Then add the Drawings that we need to "Unbind" and it will all be saved in a separate folder with the appropriate date as folder name. for BIND, we check the "Bind External References" but same process. Quote
Steven P Posted August 5, 2022 Posted August 5, 2022 Not something I often do so can't help with the specifics, but 3 days for 100+ drawings sounds like a very long time, how are you doing this? Mostly my work is single drawing sheets, no xrefs, the client gets PDF and DWG file copied straight from our system. It might be possible to do this a bit quicker with a LISP and using something like Sctipt Pro (https://www.cadig.com/products/autocad-script-pro.php) to do all the drawings as a batch - so long as each drawing is set up to plot, publish, or e-transmit as needed, depends what you are doing now. I often use a batch and script (similar to Script Pro) to plot PDFs, mine is a bit slow (just the way it is designed), but will plot PDFs in about 4 seconds a drawing, If you had a LISP to bind a drawing it shouldn't take much longer for each drawing (10 minutes for 100 drawings.. and this is slow, slow enough to have make a cup of tea, multitasking!!). Do you do anything apart from hitting the 'bind' button for each drawing? (might be your answer is along the lines of "Oh, yeah, we have to open each drawing first to purge them, then save-as to a new location and then bind them" ), am sure that something in your process is slowing you down and am sure that could be automated to speed things up.. but I am not an expert on binding things simply because we don't do that a lot. And I am not sure if this link is any use, test it out on a temporary drawing and see what it does -there is a bit to read in there 1 Quote
Emmanuel Delay Posted August 5, 2022 Posted August 5, 2022 (edited) This seems to work fine for binding. To make it even faster you can auto-execute the command. See the end of the script. It executes the command. Autoloads. Closes the drawing. (EDIT: Look at my next reply. You may not want a quick save, rather a save as with a different name) It doesn't ask questions, it just binds everything. (vla-Bind tmpObj :vlax-true) does bind->insert. Perhaps you want false (bind->bind); depending on preferences. ;; slightly modified from: ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-and-bind-all-xrefs-in-modelspace/td-p/3651968 (defun c:XrefBind (/ tmpObj) (vl-load-com) (vlax-for objs (vla-get-ModelSpace (vla-get-activedocument (vlax-get-acad-object)) ) (if (and ;; block insert (= (vla-get-ObjectName objs) "AcDbBlockReference") ;; blocks with a path are xrefs (vlax-property-available-p objs 'Path) ;; make a temporary object (setq tmpObj (vla-Item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object)) ) (vla-get-Name objs) ) ) (not (assoc 71 (entget (tblobjname "block" (vla-get-Name objs))))) ) ;; bind xref (progn (vla-Bind tmpObj :vlax-true) ) ) ) (princ) ) ;; execute command, quick save, close drawing (defun autoload ( / ) (c:XrefBind) (command "Qsave") (command "close") ) (autoload) ---- e-transmit, with autoload at the end. It saves a .zip with the same name and in the same folder as the drawing you run it on ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-etransmit-all-open-file/td-p/6063206 (DEFUN c:etra () (command "_qsave") (command "_etransmit" "_c" (strcat (getvar "dwgprefix") (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 3) ) "ZIP" ) ) (command "_close" "Y") ) ;; autoload (c:etra) Edited August 5, 2022 by Emmanuel Delay 2 Quote
Steven P Posted August 5, 2022 Posted August 5, 2022 Just to note, xrefbind doesn't save the bound drawing as a new drawing, it might be convenient to change the qsave at the end to 'save as' with a file name "Drawing_Number_Bound.Dwg" ? 2 Quote
Emmanuel Delay Posted August 5, 2022 Posted August 5, 2022 (edited) 1 hour ago, Steven P said: Just to note, xrefbind doesn't save the bound drawing as a new drawing, it might be convenient to change the qsave at the end to 'save as' with a file name "Drawing_Number_Bound.Dwg" ? Oh yes, good point. ;; execute command, save with a new name, close drawing (defun autoload ( / new_name) (c:XrefBind) ;; save as. New name: (setq new_name (strcat ;; path (getvar "dwgprefix") ;; dwg name, but cut off the ".dwg" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4) ) ;; add a postfix (strcat "_bound.dwg") ;; feel free to change this postfix ) ) (command "_saveas" "" new_name) ;;(command "Qsave") (command "close") ) Edited August 5, 2022 by Emmanuel Delay 3 Quote
BIGAL Posted August 5, 2022 Posted August 5, 2022 A dwg with 88 layouts using lisp, plot to pdf is dont blink will miss a page being plotted. So like others it sounds like your plotting a layout almost manually. if using Publish should be fast. Maybe make sure do in background. I would not work in the session doing the publish start another if you must. I have done stuff with scripts open, do something and save etc and it should be super fast maybe 1 minute for a dwg and that is extreme. That is 1hr 40min not 3 days. I use ghostscript to rejoin the pdf's from the lisp back into a single pdf. Again did 88 sheets 1 go. Can you describe the 100 dwgs are they 1 sheet per dwg ? How many sheets all up 100 or more ? Quote
CAD_Noob Posted August 9, 2022 Author Posted August 9, 2022 (edited) On 8/5/2022 at 7:25 PM, Emmanuel Delay said: Oh yes, good point. ;; execute command, save with a new name, close drawing (defun autoload ( / new_name) (c:XrefBind) ;; save as. New name: (setq new_name (strcat ;; path (getvar "dwgprefix") ;; dwg name, but cut off the ".dwg" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4) ) ;; add a postfix (strcat "_bound.dwg") ;; feel free to change this postfix ) ) (command "_saveas" "" new_name) ;;(command "Qsave") (command "close") ) So I can use this lisp and add it to my startup suite, run etransmit with Unbind option and turn on Auto-Publish to generate PDF? then I'll just moved the bounded drawings and PDF to their respective folders... will try this and see if it will work EDIT : it's not binding though it is successfully creating a new file with _bound prefix I check the newly created bounded drawing and it did not bind.... i merge the lisp or maybe i did something wrong. this is what i used. ;; slightly modified from: ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-and-bind-all-xrefs-in-modelspace/td-p/3651968 (defun c:XrefBind (/ tmpObj) (vl-load-com) (vlax-for objs (vla-get-ModelSpace (vla-get-activedocument (vlax-get-acad-object)) ) (if (and ;; block insert (= (vla-get-ObjectName objs) "AcDbBlockReference") ;; blocks with a path are xrefs (vlax-property-available-p objs 'Path) ;; make a temporary object (setq tmpObj (vla-Item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object)) ) (vla-get-Name objs) ) ) (not (assoc 71 (entget (tblobjname "block" (vla-get-Name objs))))) ) ;; bind xref (progn (vla-Bind tmpObj :vlax-true) ) ) ) (princ) ) ;; execute command, save with a new name, close drawing (defun autoload ( / new_name) (c:XrefBind) ;; save as. New name: (setq new_name (strcat ;; path (getvar "dwgprefix") ;; dwg name, but cut off the ".dwg" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4) ) ;; add a postfix (strcat "_bound.dwg") ;; feel free to change this postfix ) ) (command "_saveas" "" new_name) ;;(command "Qsave") (command "close") ) (autoload) Edited August 10, 2022 by CAD_Noob Quote
LOST in CAD Posted July 17, 2023 Posted July 17, 2023 I am looking to unbind some dwgs that were not saved separately. Do you think you could help me "un"bind them? I was thinking to just go to another drawing out of the sheet set that has the x-refs in it and just save again with a new name, xref agian and just make changes...Not sure if this is the best idea. 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.