Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to automate the drawing-creation in our company. Steps I've taken:
- create new drawingdocument with template
- Save new drawingdocument
Problem:
Creation of new document works, but the next step, saving it to a specific location, fails. Error handler is initiated and displays error: Invalid procedure call or argument.
Used code:
Dim DXF_DWG as DrawingDocument 'Create new drawing based on template Set DXF_DWG = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject, ThisApplication.FileOptions.TemplatesPath & "\Folded and Flatpattern DXF.dwg", True)
'Save new drawing to specific location Call DXF_DWG.SaveAs("C:\Temp\Test.dwg", False)
As told, the VB-code raises an error on the last command. What am I doing wrong? What are the correct steps in VBA to create a new drawing document based on a template and save the newly created drawing to a desired location?
Product Design Suite 2024
Inventor 2024 (v 28.20.27200.0000), Vault Basic 2024
Fusion 360
HP Workstation Z4
Intel Xeon 3.4GHz
32GB RAM
Windows 10 Professional (64bit)
Solved! Go to Solution.