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

Hi @max.baumann07.  Does the error message indicate which line within the code that is encountering the error.  I only see two places where a 'path' is being specified.  At the beginning, where you browse for the excel file, then try to open that Excel file, then later where you are specifying the SaveAs path, using oDir & oPName variables.  If the assembly had not been saved yet, then you will not get the needed path data when setting the value of the oDir variable.  If that cell you are specifying within the Excel sheet is empty, or maybe if the cell is formatted as something other than text, you may be getting bad data from that cell to set as the value of oPName variable.  Maybe try using a Logger.Info() or MsgBox, or MessageBox.Show() to show/record what full file name you end up with before trying the SaveAs line.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)