Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: max.baumann07

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

EESignature

(Not an Autodesk Employee)