Message 1 of 3

Not applicable
07-11-2018
10:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I was writing an ILogic external rule which converts my IDW files to PDF.
Below is my code:
SyntaxEditor Code Snippet
Dim doc As Inventor.Document doc = ThisDoc Dim oPath As String = 'pathOfFile Dim oNewName As String = 'nameOfFile
Dim oType As String = ".pdf" 'set type of document (PDF) doc.SaveAs(oPath & oNewName & oType, True) 'save PDF in same location as file found doc.Close()
As you can see in my code, I use the 'SaveAs' function with parameter as true (which makes it save copy as).
Now I was happy with that code, but then I saw at this link that there is another way to do it:
In the link, they use this function
PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
I'm just wondering what the differences are between the 2 functions. One thing that is worrying me is the OData medium and context ie:
ThisApplication.TransientObjects.CreateDataMedium
I do not have this in my original script, and I am wondering if it is needed.
Thanks for your help.
Solved! Go to Solution.