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

ThisDoc.FileName is a read-only property, you can't set it from code. If you are creating a drawing from scratch then you need to make your filename first as a string and have Inventor create the drawing for you.

 

The correct syntax to create the filename would look something like this:

Dim filename = iProperties.Value("Project", "Part Number") & "-" & iProperties.Value("Project", "Description") & ".idw"

 

To create a new drawing you use the ThisApplication object.

Dim drawing as DrawingDocument = ThisApplication.Documents.Add(kDrawingDocumentObject)

drawing.SaveAs(filename, False)