• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro x pdf

  • Thread starter Thread starter BOSCO '71
  • Start date Start date
I insert myself with an addition to the topic: can you add a "email send" after saving the file in pdf?
Hi.
 
can you add a "email send" after saving the file in pdf?
Hi.
considering that it is not said that every time you save in pdf you will need to send in a single email,
considering that each operating system is configured differently with different email clients, it doesn't seem like a good idea.

rather some interesting commands could be:
- open the rescue folder
- open the file with the default program

then on acrobat put the icon 'send file'
Code:
' Custom commands to be added immediately after rescue commands
fullfilepath = path + "\" + name + "." + "pdf"

'open the rescue folder and select the file
createobject("wscript.shell"). exec("explorer /select,""" + fullfilepath + """)

'Open the file with the default program
createobject("wscript.shell").run("""" + fullfilepath + """)
code tested, it works from me.
 
Good evening to all,
Thank you wasp for the very useful macro.

I would have a question:
I used this program line:
call objdoc.saveas (path + "\doc" + name + " - material." + "pdf") ' save by name
But if the doc folder doesn't exist how I make it?
Of course it would be useful for you to verify that there is the folder and if there is no one to create it. . .
 
the folder will not be "\doc" but "\doc".

I take that saveas doesn't work if the folder doesn't exist.

in this case you will need a check (if.then..else) before the saveas to check if the folder exists and if there is no need to be created.
for files I use this function, it should also work for paths:
Code:
function file_exist(filename)
    dim fso
    set fso = createobject("scripting.filesystemobject")
    file_exist = fso.fileexists(filename)
    set fso = nothing
end function
to create the path try to integrate this solution:http://stackoverflow.com/questions/...n-windows-using-vbscript-both-the-folders-notCan you do it yourself? If you can, tell us briefly how you did, thank you, hello
 
ahime. . .

I managed to figure out where to introduce that part of code, but I can only create the directory in c:\...
few language skills. . .
 
Well, I even suggested you wrong. file_exist() function works for files but not for folders, I apologize.
googlando "vbscript check if folder or exist it"
it is easy to find examples that work.

provided that I am in favor of the fact that pdfs are in the same position as the dft and not on the other side, because it complicates things and management, if you just want to complicate life, then here is the new version with the predisposition to change the line path 72:
save+pdf v. 0.5(basic script to be customised according to your needs)ps: is appreciated the contribution of a suitable icon by users, for subsequent releases
 

Attachments

at the bottom of the macro in vbs searches for the line 124 and you should read
if not fso=... etc.
before that paste

set fso = createobject("scripting.filesystemobject")

so it works but waits for a confirmation from wasp that will tell you if there is any other modification.
 
save+pdf v. 0.5.1bug fix; the rescue path is created if it does not exist.(basic script to be customised according to your needs)ps: is appreciated the contribution of a suitable icon by users, for subsequent releases.
 

Attachments

Hello wasp,
I have an implementation for you that you know about macros....
according to you before the end of the pdf file, you can add a:
open the file put on the table (that both asm and par) to save in stp in the folder I say, and then close the 3d model and exit the macro.
What are you saying?
 
should be simple enough. the logic of operation must be defined in a unique way.
if the draft draws multiple 3d files must process them all or only the first?
is it preferable to enter the question 'Export 3d in step format?' or not?
It should also be taken into account that export options are generally saved and maintained by the last modification. is valid for any type of file, for example if for the pdf carry out in black and white but to do a work imposed by hand "color" after always carry out in color: what troubles create me with step / iges ? a pdf opens for verification in a few seconds, a step is already more complicated.
the only big problem could be if I opened both the draft and the 3d and are both unsaved: in that case the right questions should be studied to first rescue the 3d then carry out in step, close(?) the 3d (without saving because made to the previous passage so the date of the step is next to the original 3d) , then save the draft then exporto in pdf
 
should be simple enough. the logic of operation must be defined in a unique way.
if the draft draws multiple 3d files must process them all or only the first?
is it preferable to enter the question 'Export 3d in step format?' or not?
It should also be taken into account that export options are generally saved and maintained by the last modification. is valid for any type of file, for example if for the pdf carry out in black and white but to do a work imposed by hand "color" after always carry out in color: what troubles create me with step / iges ? a pdf opens for verification in a few seconds, a step is already more complicated.
the only big problem could be if I opened both the draft and the 3d and are both unsaved: in that case the right questions should be studied to first rescue the 3d then carry out in step, close(?) the 3d (without saving because made to the previous passage so the date of the step is next to the original 3d) , then save the draft then exporto in pdf
- if the draft draws multiple 3d files must process them all or just the first?would be ideal to export them all - export optionsmust be kept those of the last exported file for all files - is it preferable to enter the question 'Export 3d in step format?you would be very useful the option. - the only big problem could be if I opened both the draft and the 3d and they're both unsaved.if both dft files and 3d model are opened export should not work.

these would be "my" answers to your questions. . .
if you ever had time to implement. . .

Thank you very much for the answer.
 
for my needs I created a small program of request approval drawings.

you select the documents you want to export (the name is created by concatenating code - revision - version) and created a new email with the zipped files attached and a default text in the object and body.

approvazione.webp
 
per [MENTION=6865]Sprinkle79[/MENTION] : I'm sorry I don't have much time at this time.

for [MENTION=31]andri.can[/MENTION] :
errorsthe following errors occurred during the delivery of the message.
andri.can chose not to receive private messages or may not be enabled to receive private messages. So you can't send him your message.
if you want to save on fixed path on server:
install notespad ++ that allows a color formatting of the simple text.https://notepad-plus-plus.org/open the vbs file on notepad++.
read the v.0.5.1. file carefully
in particular from line 74 (notepad++ shows left the line number)
1: Enter the fixed server path to line 75: path = "
2: Decode row 95 (command saveas "dxf"), to decompress the initial apostrophe

do some tests by saving your dfts, then read rows 104 and 113 (command open folder, command open file), if you don't need it, comment the line by putting the apostrophe at first, I think open pdf file is very convenient.

nb: If you put a fixed path, all files will be saved in one folder.
you can do everything just that the rules are simple, the rules are decided by people so they can not be simple because of nature people are complicated and unordered, so you have to simplify life because it is already complicated of it. If there are questions, first make it clear what you want to get, that it is simple for everyone, then if you need to ask, then hello.
 
it is possible to do everything just that the rules are simple, the rules are decided by people so they cannot be simple because of nature people are complicated and unordered, so it is necessary to simplify life because it is already complicated of its own.
the office "complication simple things" Unfortunately it is present in all companies :biggrin:
 
Hello wasp,
I discovered your macro today and is fantastic!! thank you! !

I wanted to ask if it was possible to convert (pdf, dxf) all the sheets in the dft design.


greetings
emanuele
 
la macro launch for you the command "Save with name" and behave like the relatives options.
then manually execute a save with name in <pdf dxf="" in="" poi=""> and before confirming with save click on the Options button: you will find your </pdf>settings used last time (current sheet, all sheets, white-black / colors, etc.)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top