What is the purpose of the 4th parameter in this call?
CComVariant pSubDocType; CComBSTR sTemplate; pInventorApp->GetTemplateFile (kPartDocumentObject, // We are creating a PartDocument kDefaultSystemOfMeasure, // mm or inches? kDefault_DraftingStandard, pSubDocType, &sTemplate);
I've seen VB examples which pass a GUID, but here we just pass a pointer, and then don't use it, often.
The 4th parameter is DocumentSubType
Input constant (GUID) that specifies the subtype of the document to be created (sheet metal or weldment). |
Sub GetTemplateFile(DocumentType As DocumentTypeEnum, ByRef SystemOfMeasure As [defaultvalue(kDefaultSystemOfMeasure)] SystemOfMeasureEnum, ByRef DraftingStandard As [defaultvalue(kDefault_DraftingStandard)] DraftingStandardEnum, ByRef DocumentSubType As [optional] VARIANT, Result As [out, retval] BSTR)
My C++ code in the original post was taken from an example which I obviously and inevitably cannot find now!
Does anyone have an example in C++ of the correct use of GetTemplateFile?
It looks to me as if the GUID parameter only needs to be used in GetTemplateFile if you are dealing with Weldment or SheetMetal.
Could that be the reason why it can be left empty in all other circumstances?
It says optional In the VB function description maybe, but there's SFA info about the C++ call... (excuse my French)