Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jingying_1213
455 Views, 6 Replies

Create a new Weldment type document?

Hi All,

 

I tried to create a new "Weldment type" assembly document using below codes.  It did create a new assembly document but it was not "Weldment type".

 

Could someone know where is the problem? Thanks!

 

Sub Main()	
	Dim oDocs As Documents = ThisApplication.Documents
	
	'THIS IS A WELDMENT SUB TYPE
	Dim oWeldment As String = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}"
	
	Dim oTemplateFile As String = ThisApplication.FileManager.GetTemplateFile(kAssemblyDocumentObject, _
	kDefaultSystemOfMeasure, kDefault_DraftingStandard, oWeldment)
	
	Dim oADoc As Document = oDocs.Add(kAssemblyDocumentObject, oTemplateFile, True)	
End Sub