10-15-2022
11:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-15-2022
11:30 AM
The method "GetTemplateFile" will not make a weldment document but will just point to the weldment template. Therefore you need to check that your template is a weldment template. Therefore you could add a message box and look if the method really points to a weldment assembly.
Dim oWeldment As String = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}"
Dim oDocs As Documents = ThisApplication.Documents
Dim oTemplateFile As String = ThisApplication.FileManager.GetTemplateFile(DocumentTypeEnum.kAssemblyDocumentObject,
SystemOfMeasureEnum.kDefaultSystemOfMeasure, DraftingStandardEnum.kDefault_DraftingStandard, oWeldment)
MsgBox(oTemplateFile)
Dim oADoc As Document = oDocs.Add( DocumentTypeEnum.kAssemblyDocumentObject, oTemplateFile, True)
Jelte de Jong
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.
Blog: hjalte.nl - github.com