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

Thank you - that sounds like what I need.  When trying it with some sample code found online, though, I get a "parameter is incorrect" error for the .Add line.  Code is below - and I have no idea what I should put into the oName variable, assuming I can get the code to go that far.

 

Any guidance would be appreciated.

 

Dim oTemp As String
Dim oDrawDoc As DrawingDocument
Dim oName As String
Dim oSheet As Sheet
Dim oModel As Document
Dim oFormat As SheetFormat

oTemp = "C:\Users\Public\Public Documents\Autodesk\Inventor 2014\Templates\English\Ticket Template.dwg"
oDrawDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, oTemp, False)
oModel = ThisApplication.ActiveDocument
oName = "А, 1"
oFormat = oDrawDoc.SheetFormats.Item(oName)
oSheet = oDrawDoc.Sheets.AddUsingSheetFormat(oFormat, oModel)