Jump to content

Recommended Posts

Posted

Been doing some wrestling with the concept of etransmitting files as of late, the idea is simple enough and quite straightforward, but sadly I crave more from it! At current etransmit offers a method of readying a drawing for issue, doing all the things it does. A flaw I have found is that you may only do this effectively one drawing at a time. I am aware that you can drop multiple files into a single instance of etransmit, but sadly this is not doing it justice as all you end up with is one .zip file packed with all the files you "bulk" etransmitted. What I really need is for etransmit to recognize each drawing file (and it's attachments be them xrefs, fonts etc) as separate entities and then keep them that way by zipping up each drawing into separate folders and naming each zip file after the processed drawing's file name. Basically achieving the same outcome as if one was to go through a set of drawings and etransmit each one manually. I typed out the etransmit command to my preferences into a .scr file for ScriptPRO in the hope I could invoke etransmit through every drawing, but it ended up being like four words long and when “create” issued, ACAD didn’t recognize L tried hitting it a few other ways but I lost confidence in myself…

Thanks guys

Posted

The AutoCAD method of using eTransmit on multiple files is to add all files (of a project) into a SheetSet. Then highlight all the files you want (or subsets > Treestructure).

 

This is very fast way of sending multiple files into one .zip

Although it doesn't create seperate .ZIP files, I hope it will help you a little.

 

iTijn

Posted

Yes, I discovered that much and thought I was on to something, but sadly having everything in one .zip file is not an option!

Posted

I have several routines for individual, backing up, aec removal, scripting, etc.

This is the one I use for scripting. Ensure you have a transmital set up before hand. It locks and freezes viewports, detachs unloaded xrefs, and creates a subdirectory in the files directory and dates it and renames the zip. Goodluck.

 

;***SCRIPTABLE ETRANSMIT

(apply

'(lambda ()

(SETVAR "CMDECHO" 0)

(COMMAND "QSAVE" )

;;;*-----------------------------------------------------------

(COMMAND "LAYER" "UNLOCK" "*" "")

(COMMAND "TILEMODE" "0" )

(COMMAND "pspace" )

(command "LAYER" "t" "VIEWPORT" "u" "*" "m" "VIEWPORT" "c" "8" "VIEWPORT" "T" "0" "S" "0" "")

(if(="Model" (getvar "ctab"))

(setq XX1 (ssget "_X" '((0 . "viewport"))))

(progn

(foreach mb (vl-remove "Model"(layoutlist))

(setvar "ctab" mb)

(setvar "psltscale" 1)

(setvar "ltscale" 1)

(setq XX1 (ssget "_X" '((0 . "viewport"))))

(command "-vports" "lock" "off" xx1 ""))))

;;;*-----------------------------------------------------------

(defun removexref (xrefname / blkname)

(if (setq blkname (tblsearch "block" xrefname))

(if (= (cdr (assoc 70 blkname)) 12)

(command ".xref" "d" xrefname)

)

)

(princ)

)

(defun remove-unloaded-xrefs ()

(vlax-for block (vla-get-blocks

(vla-get-activedocument

(vlax-get-acad-object)))

(if (and (= :vlax-true (vla-get-isxref block))

(= 0 (vla-get-count block))

)

(vla-detach block)

)

)

)

(apply

'(lambda ()

(remove-unloaded-xrefs)

(princ)

)

'()

)

;;;*-----------------------------------------------------------

(defun TODAY ( / d yr mo da)

(setq d (rtos (getvar "CDATE") 2 6)

yr (substr d 3 2)

mo (substr d 5 2)

DAY (substr d 7 2)

);setq

(strcat yr mo DAY)

);defun

;;;*-----------------------------------------------------------

(defun NOW ( / d hr mi se)

(setq d (rtos (getvar "CDATE") 2 6)

hr (substr d 10 2)

mi (substr d 12 2)

se (substr d 14 2)

);setq

(strcat hr mi se)

);defun

;;;*-----------------------------------------------------------

(SETQ CPFIX (getvar "dwgprefix"))

(SETQ CDNAM (getvar "dwgNAME"))

(SETQ NDIR (STRCAT "eTran-" (today) "/" ))

(vl-mkDir (strcat CPFIX NDIR ))

;;;*-----------------------------------------------------------

(SETQ NFNAME (strcat (vl-filename-base (getvar "dwgname")) "-" (today) (NOW) ))

;;;*------------------------------------------------------------

(command "saveas" "2004" (strcat (getvar "dwgprefix") NDIR NFNAME ".dwg"))

;;;*------------------------------------------------------------

(command "ETRANSMIT" "CH" "ETRANS" "C" (strcat (getvar "dwgprefix") NFNAME ))

;;;*------------------------------------------------------------

(COMMAND "QSAVE" )

;;;*------------------------------------------------------------

(princ)

)

'()

)

Posted

This has been most helpful, thanks!!

Posted

I still use an add on when i issue as like you i need make independent zip file for each file, it also makes me a PDF & prints at the same time oh & it binds to should you need it 8).

PM if intrested.

 

Its a shame AutoDesk cannot get there head around whats needed when ones issues drawings & its a shame one has to do the same task many times to get what you need even with the so called SheetSet manger.

 

Best of luck

  • 3 months later...
Posted

Curious... what's the point of having several zip files other than aggravating whoever's unlucky enough to have to unzip them all?

Posted
Curious... what's the point of having several zip files other than aggravating whoever's unlucky enough to have to unzip them all?

 

 

I don't understand your question?

Because Clients/Consultants/Contractors get a nice little package for each file.

Posted
I still use an add on when i issue as like you i need make independent zip file for each file, it also makes me a PDF & prints at the same time oh & it binds to should you need it 8).

PM if intrested.

 

Its a shame AutoDesk cannot get there head around whats needed when ones issues drawings & its a shame one has to do the same task many times to get what you need even with the so called SheetSet manger.

 

Best of luck

 

 

Careful when binding and transmitting.

All viewport layer, xclip bounds, etc. etc. are/is lost.

  • 6 months later...
Posted
I have several routines for individual, backing up, aec removal, scripting, etc.

This is the one I use for scripting. Ensure you have a transmital set up before hand. It locks and freezes viewports, detachs unloaded xrefs, and creates a subdirectory in the files directory and dates it and renames the zip. Goodluck.

 

;***SCRIPTABLE ETRANSMIT

(apply

'(lambda ()

(SETVAR "CMDECHO" 0)

(COMMAND "QSAVE" )

;;;*-----------------------------------------------------------

(COMMAND "LAYER" "UNLOCK" "*" "")

(COMMAND "TILEMODE" "0" )

(COMMAND "pspace" )

(command "LAYER" "t" "VIEWPORT" "u" "*" "m" "VIEWPORT" "c" "8" "VIEWPORT" "T" "0" "S" "0" "")

(if(="Model" (getvar "ctab"))

(setq XX1 (ssget "_X" '((0 . "viewport"))))

(progn

(foreach mb (vl-remove "Model"(layoutlist))

(setvar "ctab" mb)

(setvar "psltscale" 1)

(setvar "ltscale" 1)

(setq XX1 (ssget "_X" '((0 . "viewport"))))

(command "-vports" "lock" "off" xx1 ""))))

;;;*-----------------------------------------------------------

(defun removexref (xrefname / blkname)

(if (setq blkname (tblsearch "block" xrefname))

(if (= (cdr (assoc 70 blkname)) 12)

(command ".xref" "d" xrefname)

)

)

(princ)

)

(defun remove-unloaded-xrefs ()

(vlax-for block (vla-get-blocks

(vla-get-activedocument

(vlax-get-acad-object)))

(if (and (= :vlax-true (vla-get-isxref block))

(= 0 (vla-get-count block))

)

(vla-detach block)

)

)

)

(apply

'(lambda ()

(remove-unloaded-xrefs)

(princ)

)

'()

)

;;;*-----------------------------------------------------------

(defun TODAY ( / d yr mo da)

(setq d (rtos (getvar "CDATE") 2 6)

yr (substr d 3 2)

mo (substr d 5 2)

DAY (substr d 7 2)

);setq

(strcat yr mo DAY)

);defun

;;;*-----------------------------------------------------------

(defun NOW ( / d hr mi se)

(setq d (rtos (getvar "CDATE") 2 6)

hr (substr d 10 2)

mi (substr d 12 2)

se (substr d 14 2)

);setq

(strcat hr mi se)

);defun

;;;*-----------------------------------------------------------

(SETQ CPFIX (getvar "dwgprefix"))

(SETQ CDNAM (getvar "dwgNAME"))

(SETQ NDIR (STRCAT "eTran-" (today) "/" ))

(vl-mkDir (strcat CPFIX NDIR ))

;;;*-----------------------------------------------------------

(SETQ NFNAME (strcat (vl-filename-base (getvar "dwgname")) "-" (today) (NOW) ))

;;;*------------------------------------------------------------

(command "saveas" "2004" (strcat (getvar "dwgprefix") NDIR NFNAME ".dwg"))

;;;*------------------------------------------------------------

(command "ETRANSMIT" "CH" "ETRANS" "C" (strcat (getvar "dwgprefix") NFNAME ))

;;;*------------------------------------------------------------

(COMMAND "QSAVE" )

;;;*------------------------------------------------------------

(princ)

)

'()

)

 

Hi,

 

I ran this lisp but it only created one etransmit of the drawing I had open. I thought it was to give me a option to select multiple drawings and create a separate zips for each. Am I doing something wrong or should I be loading it differently

Thanks

Stephen

Posted

Stephen,

First copy past this into a txt file and name it what ever you like with a ".lsp" extension.

You would have to create a call command for this routine in, say your acadxxxxdoc.lsp file or where ever you fancy.

Something like (defun c:ets (load "drive:\path\file name) -t)

Then you would have to compile a script of all the files you wish etransmitted, add the new command call and run the script..

I each file location a folder is created full of the zips.

Posted

Or what I do :P

 

I use AutoScript. Create a text file with a SCR extension with the following inside:

(vl-load-com)
(setq dwg (vl-filename-base (getvar "DWGNAME"))
     path "C:/TEMP/ISSUE/"
)
(if (not (vl-file-directory-p path)) (vl-mkdir path))
_PURGE _ALL *
_NO
_PURGE _ALL *
_NO
_PURGE _ALL *
_NO
_PURGE _Regapps *
_NO
_AUDIT _YES
(if (setq fn (findfile (strcat path dwg ".DWG"))) (vl-file-delete fn))
(command "._SAVEAS" "" (strcat path dwg ".DWG"))
(if (setq fn (findfile (strcat path dwg ".ZIP"))) (vl-file-delete fn))
(command ".-ETransmit" "_CHoose" "Bound" "_Create" (strcat path dwg ".ZIP"))

Make sure you've got an eTransmit setup made (the one I've made is called Bound - as it binds the xrefs), the Standard one should work as well - you just have to modify the script to use that one instead. Edit the path to where you want the ZIPs to be saved (note use either forward slashes or double-backslashes). Then open AutoScript, browse to this SCR file, then add all the DWG's you want to issue. Click the Run button and wait till it completes for each.

 

You'll end up with the DWG's and the ZIP's in that one folder. I've saved the DWG's as since I want to be able to issue even if someone else has the file open at the time. But it's not too dificult to delete them afterwards is it? Anyhow, the ZIP is named exactly as the DWG was (that's alterable BTW). And of course you could extend it to do much more than just purge & audit, e.g. you could load and run bobafuka's code as well from this script. Or even anything else you might need ... say e.g. a lisp reading the TB to get hold of the revision number to affix it to the zip file's name, or even the current date, or whatever.

 

As for binding, I'm in total agreement about it causing more problems than it's worth. Unfortunately you always get a client / consultant who simply cannot get around the fact that they just need to extract all the files from the ZIP in order to work much easier without binding. So after to-and-fro phone calling, the project needs to proceed, and you don't have time to teach someone who doesn't want to learn ... so bind the #%CK3R :x. About detaching unloaded xrefs ... that's a nice touch, but not strictly necessary. I suppose that's done so some idiot doesn't ask you: "Where are these files? They're unloaded. What does that mean? Am I missing something?" :lol:

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...