Message 1 of 10

Not applicable
08-03-2018
07:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I would like to know if this is possible using Ilogic:
Exporting a .pdf from an .idw on save to a different location based off of a description in the title block. So if the title in the title block has the word "ten" in it for example. It would export the pdf on save to a different folder called "ten". If it has the word "eight", it would export it into an "eight" folder. And so on.
Right now we have an ilogic rule to just export the .pdf into the same location as the .idw was saved in. This code is:
SyntaxEditor Code Snippet
'Get the Full Path of the file FullPath = ThisDoc.Path 'Gets the Workspace Path WorkspacePath= ThisDoc.WorkspacePath() 'Gets the Length of the WorkspacePath String WorkspacePathLength = Len(WorkspacePath) 'Gets just the Path of the file PathOnly = ThisDoc.Path 'Removes the Workspace Path from FullPath DirectoryPath = Strings.Right(PathOnly, PathOnly.Length-WorkspacePathLength) 'Sets the Dirctory that the PDF should be saved in PDFPath = "L:\$WorkingFolder\Designs\" & DirectoryPath 'Checks to see if that directory exists, if not, it is created If(Not System.IO.Directory.Exists(PDFPath)) Then System.IO.Directory.CreateDirectory(PDFPath) End If 'Saves the PDF in the desired location ThisDoc.Document.SaveAs(PDFPath & "\" & ThisDoc.FileName(False) & (".pdf") , True)
Would there be a simple way to modify this code to do what I'm looking for?
I hope this makes sense, and thanks for your help!
Solved! Go to Solution.