Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having an issue not "having" to give the model doc in AddUsingSheeetFormat in 2026.
If I don't give it the modeldoc it will give me an error parameter incorrect.
object missing = Type.Missing; string activeDocPath = ActiveDrawing.ReferencedDocuments[1].FullFileName; Document modelDoc = (Document)invApp.Documents.Open(activeDocPath, false) ; Sheet newSheet = drawingSheets.AddUsingSheetFormat(sheetFormat, modelDoc, "", null, null, null);
But if I use the model doc it adds a view to the sheet and a Parts list automatically. Is this new functionality? Or am I just using the API wrong.
I'd like to do this.
Sheet newSheet = drawingSheets.AddUsingSheetFormat(sheetFormat, null, "", null, null, null);
Before you ask. 🙂 I have validated that my sheetformat exists and is pointing to the correct one. There are no prompts when adding a sheet manually.
Thanks for any help!
Tiffany
Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Solved! Go to Solution.