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

stampare doc in pdf

  • Thread starter Thread starter psycomantis
  • Start date Start date

psycomantis

Guest
Hello everyone
I need to print documents in pdf on the drawing of catia, can you realize a program that at only one click does me directly pdf?
Thank you.
 
Hi.
I use this simple code:
sub catmain()

dim drawingdocument1 as document
set drawingdocument1 = catia.activedocument

dim drawingsheets1 as drawingsheets
set drawingsheets1 = drawingdocument1.sheets

dim drawingsheet1 as drawingsheet
set drawingsheet1 = drawingsheets1.activesheet

winuser = catia.systemservice.environ("username")

drawingdocument1.exportdata "c:\documents and settings\" & winuser & "\desktop\" & left(catia.activedocument.name, len(catia.activedocument.name) - 11), "pdf"

end sub
is made to save in windows xp on the user's desktop that activates an active drawing pdf at that time.
to speed up the thing I added an icon linked to this macro in a drawing environment toolbar


p.s. I did the same thing to save dxf from drawing and stl and step from 3d, code is very similar
 
to think about it well for the catdrawing there is the voice saved as pdf.
Why create a program?
 
It is true that there is the function in the rescue menus. . .why x we are more comfortable having icons that with a single click save files in the various formats to be sent to suppliers/customers

also with small modifications I also did scripts to make sure that the project to which the file belongs and goes to save it directly in the appropriate path on our server

if you need (and if you have the license) I also leave the macro to save the steps... even in this case you can change the rescue path that is now set on the desktop


sub catmain()

dim partdocument1 as document
set partdocument1 = cat. active document

dim product1 as catbasedispatch
set product1 = partdocument1.getitem ("")

partnum = product1.partnumber

winuser = catia.systemservice.environ("username")

partdocument1. exportdata "c:\documents and settings\" & winuser & "\desktop\" & left(catia. activedocument.name, len(catia.activedocument.name) - 11), "stp"

end
 

Forum statistics

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

Members online

No members online now.
Back
Top