Message 1 of 2
Inventor 2020 System.IO.Directory.CreateDirectory failed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, everybody.
I have a simple rule that worked fine in older versions of Inventor. But in 2020 version it gives out an error.
The problem is with creating a folder. If you create the folder by hand, everything works. The code is quite standard. Can you help me please to understand where the error is?
I have similar rules that used to work, but now they all come out with an error exactly at the stage of creating the folder.
If it has already been discussed, I apologize. But I could not find a solution through search.
Dim SubFolder as String = "PDF" If Not System.IO.Directory.Exists(SubFolder) Then System.IO.Directory.CreateDirectory(SubFolder) End If FullName=ThisDoc.Path & "\" & SubFolder & "\" & ThisDoc.FileName(False)& (".pdf") ThisDoc.Document.SaveAs(FullName, True)