Hi,
Is there way to save as pdf file our idw files? I do not want to use "pdf printer" method like "zan image" or "PDF Creator"...
Infact, there is menu "save as pdf"... So why shouldn't I use it in VB.Net?...
Version Inventor 2012...
Regards,
Mucip:)
Solved! Go to Solution.
Solved by mucip. Go to Solution.
You can use the SaveAs method in VB but you need to add ".PDF" to your filename
In iLogic you would use :
ThisDoc.Document.SaveAs("C:\yourfolder\filename.PDF" , True)
Or in vb you would use something like :
Dim oDoc As Inventor.Document oDoc = ThisApplication.ActiveDocument
oDoc.SaveAs("C:\yourfolder\filename.PDF",True)
Hope this helps,
Tom
Hi,
Thanks alot for your kind interest... Yesterday I found this info below page infact.
http://modthemachine.typepad.com/my_weblog/2009/01/translating-files-with-the-api.html
But I need to create merged pdf file from more than one idw files which have more than one sheets... But in abowe case we can create only only one pdf file of each idw sheet... Is there any solution?...
Regards,
Mucip:)
I actually access our PDF addin - like the old Plot to File, so that I can set certain options within it including all sheets as one PDF.
Public Sub MakePDF() If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then Dim oDrgDoc As DrawingDocument Set oDrgDoc = ThisApplication.ActiveDocument Dim oDrgPrintMgr As DrawingPrintManager Set oDrgPrintMgr = oDrgDoc.PrintManager 'Printer name oDrgPrintMgr.Printer = "CutePDF Writer" 'Paper size, scale and orientation oDrgPrintMgr.ScaleMode = kPrintBestFitScale oDrgPrintMgr.PaperSize = kPaperSize11x17 oDrgPrintMgr.PrintRange = kPrintAllSheets oDrgPrintMgr.Orientation = kLandscapeOrientation oDrgPrintMgr.SubmitPrint End If End Sub
Hi,
Thanks a lot for your kind interest.
I solved! As I said before I did not want to use third party printer like Cute or Zan image...
I use "saved as" all sheets to pdf and save their filenames like 000.pdf, 001.pdf, 003.pdf etc.. in temp directory. Than I used "itextsharp.dll" to merge all these pdf documents. And perfect solution 🙂
Regards,
Mucip 🙂
hi,
how do you use "itextsharp.dll"? i can not add reference in vba editor. thanks.
Hi,
Actually I did not use this dll with VBA. I used it with VB Express 2010. I do not have any idea about using this with VBA...
Regards,
Mucip:)
Here's another approach where you don't need to use any additional components. Inventor's PDF translator supports writing all of the sheets into a single file. By directly driving the translator you can control this. Below is a VBA sample from Inventor's programming help that demonstrates this.
Hi,
For your information... I got a problem when I use standart pdf create function of Inventor... When I use this I can not search Turkish string in pdf output drawing file...
Be careful...
Regards,
Mucip:)
brian,
I am using the same approach as you. but i want to merage all pdf file into one.
in my case, all part drawings from one assembly go into one pdf. I guess I need third party resource.
thanks.
mucip,
i found out itextsharp is .net not .com. I dont think i can use in vba.
thanks
base on the resource i have right now, i do everything in iloigc which is .net.
then I call ilogic rule at vba. it works fine....haha such as workaround.