04-06-2022
09:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-06-2022
09:07 AM
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)