08-30-2023
11:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-30-2023
11:22 AM
Besides what I mentioned above, another thing that might be causing problems is if a file with that same name already exists in that same folder. I don't know if your system will just let you overwrite it, without any prompt or not, especially if that file may be open or ReadOnly for some reason. Do you have full Read/Write permission in that directory? Try adding some lines of code like the following before your SaveAs line of code.
Dim sFFN As String = oDir & "\" & oPName & ".ipt"
Logger.Info("SaveAs FullFileName = " & sFFN )
If System.IO.File.Exists(sFFN) Then 'show a message to the user, or skip this one, or do something different.
Wesley Crihfield
(Not an Autodesk Employee)