• 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
save+pdf v.0.2
v.0.2 made recommended changes in previous posts

nb: in the language "vb" apostrophe character ' indicates that the following text is a comment.

open the file with notepad++ and add/cut the comment apostrophe to the "Save" instructions according to your needs.

inside the zip there is a exe that starts the wsf file (windows script file) which has the same name as the exe.

edit: deleted attachment, for updated version go here:
http://www.cad3d.it/forum1/showthread.php?24486-macro-x-pdf&p=288238&viewfull=1#post288238
 
Last edited by a moderator:
Thank you! It is perfect, I put it as a button in the quick access bar and I think it will be extremely useful!
 
be_on_edge: there was a small error in your code (len on the file object and not on the name ;-p)

I did macro using be_on_edge code:
- the dft is saved
- a copy is saved in pdf

You can then add the button to the quick access bar.

the code is not compiled: is written in wsf language (windows script file)

and it is easy to consult and make small changes with notespad++ (select vb language)

can be launched directly the wsf file, or given unexpert users don't make it, then I created a exe that launches the wsf with the same name in the same folder
(nb: the exe does not find the wsf on the network paths, but only on the routes starting type with e:\...; c:\.... etc... ) if you want to map macros on the server, you need to map the network path as 'network unit'
hello wasp 83
Sorry but not very mastic vbese
I would need to save pdf on a folder that is not the same as the dft
Thank you.
 
I would need to save the pdf on a folder that is not the same as the dft. thanks
I structured the code to arbitrarily insert the path
Code:
path = "c:\my folder"
I included an example with the relative routes
Code:
percorso = curpath + "\..\dwg"
you could also put a text dialog box but it would lose a lot in comfort and utility (it already solidedge!).

I suppose that in some companies the pdf/dwg archive is structured and customised: for particular needs it is better to feel the opinion of a programmer who analyzes the specific realities and problems.

Usage notes: see previous postnb: always scrolls all the post to find the latest version available
 

Attachments

Good morning to all, excuse ignorance but how do you install this macro? or how does it work?
Thank you.
 
there are so many ways:
the most comfortable is definitely described in the solid edge guide to the section: "personalize soloedge\personalize toolbar quick access\add commands to toolbar quick access"
 
Excuse me vespa83... .
can you use the "Save" button already in solid edge? because for now in the ribbon bar makes me create a new button to launch the macro...
and if I wanted to print in pdf with file closure instead of saving?
thanks again for the availability. ...
 
dedo, if you open the .wsf file with notepad (or notepad++) you will notice that it is a source file that does not need to be compiled.
commands are listed which are executed later.
you can add what you need by entering the fateful world of programming.
to close the declared current document as objdoc is enough to write:
call objdoc.close()
before the issue of the object.
If it does not go, or remove the brackets - seen that no arguments are necessary - or remove the call.

These functions are meant as extensions and/or customizations of the basic program (which should always be known and deepened), then everyone sets their own way of working.
 
Excuse me vespa83... .
can you use the "Save" button already in solid edge? because for now in the ribbon bar makes me create a new button to launch the macro...
and if I wanted to print in pdf with file closure instead of saving?
thanks again for the availability. ...
hi, to do what you ask you need to develop an add-in to solid edge, which is not very easy. there are solutions that already do this, and much more.
the link below http://www.ccsteam.it/prodotti/solidrules If you're my client, call me and I can give you all the information.
 
hi, to do what you ask you need to develop an add-in to solid edge, which is not very easy. there are solutions that already do this, and much more.
the link below http://www.ccsteam.it/prodotti/solidrules if you're my client, call me and i can give you all the information.
thanks delki, i am a customer yes and we have already felt for this problem because the ccsteam solution does not do what it should do. in the meantime, to swab, i think a very simple macro like this can be enough. thank you for your availability.
 
Thanks delki, I am a customer yes and we have already felt for this problem because the ccsteam solution does not do what it should do. In the meantime, to swab, I think a very simple macro like this can be enough. Thank you for your availability.
Hi, I'm sorry, but I didn't understand who you were from the nik, I deduced that I could be a client just because I came. So if you talked to me or a colleague, anyway from what I read solidrules the only thing that does not is the pdf generation at the end of the file, which I personally find sensible, since the closure of a file without the rescue would mean having a pdf different from the table. for the rest I wish you good work!
 
from what I read solidrules the only thing that does not do is pdf generation at the closing of the file, which I personally find sensible, since the closure of a file without the rescue would mean having a pdf different from the table.
They are light line edin. yes in fact solid rules is a great product, I refer to the share pdf that would be great more than anything because it costs a sproposito less considering the needs of the company. solid rules makes much more certain.
Hi.
 
They are light line edin. yes in fact solid rules is a great product, I refer to the share pdf that would be great more than anything because it costs a sproposito less considering the needs of the company. solid rules makes much more certain.
Hi.
Good morning.

share pdf is no longer developed, it is a product that will go into "natural" discharge. solid rules has been implemented with vaulting features that I personally find very interesting, a "sbyze" to the new product (without commitment obviously) I would give it.
 
...a "sbyze" to the new product (without commitment obviously) I would give it.
Of course, already seen the demo of the new product. thanks anyway for the advice.
at this point.... someone uses solid rules focusing??? What do you think?
thanks to all
 
Of course, already seen the demo of the new product. thanks anyway for the advice.
at this point.... someone uses solid rules focusing??? What do you think?
thanks to all
to have information about it I suggest to open a special discussion, so the request is n po too "seng" from others!
 
thanks to vespa_83 for this macro.
on our installations did not work, we work with insights and for some reason when trying to save local gave me error on the function (or what it is) "left"
by force of evidence and with some luck I modified it in this way:

...... .
dim objdoc

dim name 'as string
dim route 'as string

' create/get the application with specific settings
' on error resume next
set objapp = getobject(, "solidedge.application")
' on error resume next
set objdoc = objapp.activedocument

call objdoc.save ' normal, put before the name for new files is correctly asked to give the name

' derives only the file name
name = objdoc.name

' default path
path = "c:\a" 'example: "c:\my folder"

' remove or add the apostrophe at the beginning of the line to disable/able education
' the lines starting with apostrophe are comment lines

call objdoc.saveas (path + "\" + name + "." + "pdf") ' save by name

' example of how you set another path, before saving in another format:
'path = "c:\my folder"

call objdoc.saveas (path + "\" + name + "." + "dxf") ' saves by name
............ .

Now it works beautifully.

Bye.
 
......

Now it works beautifully.

....
as not mentioned, the macro works but saves files with double extension (e.g. filename.dft.pdf). :frown:
Is there any aima pia explaining how to change the lmacro to make sure to isolate the root of the file name?
in practice name = objdoc. name mi restituisce nomefile.dft, you can only get namefile?

p.s. him provato con name = objdoc.namenoextension but I have not been understood! :biggrin:

Bye.
 
as not mentioned, the macro works but saves files with double extension (e.g. filename.dft.pdf). :frown:
Is there any aima pia explaining how to change the lmacro to make sure to isolate the root of the file name?
in practice name = objdoc. name mi restituisce nomefile.dft, you can only get namefile?

p.s. him provato con name = objdoc.namenoextension but I have not been understood! :biggrin:

Bye.
nome = left (objdoc.name, lazy(objdoc.name) -4)
 

Forum statistics

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

Members online

No members online now.
Back
Top