I understand your question and have faced the same challenge. To my knowledge, you could not access the custom property template through the API until 2018. I have actually implemented a macro just recently that solves this issue. I had some API support that helped me find this new command. I was searching in 2017, but I could not find.
1. Make sure you have the 2018 SOLIDWORKS object libraries referenced.
2. Dim and Set objects etc as follows (object names are arbitrary)
3. Implement the 2018 command to change the template file
Dim swApp As SldWorks.SldWorks
Dim swModel As ModelDoc2
Dim swModelExtension As ModelDocExtension
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc (or other technique to access the part or assy doc)
Set swModelExtenstion = swModel.Extension
Now you can access and change the custom property template file. I found it necessary to set the template to "-None-" and then re-select the desired template. This new selection can be done via custom drop down userform. I created one that loads all our custom property templates in to a drop down for the user to select. The routine then drills through the open assembly via recursion and forces the new template to parts and assemblies per the drop down selection.
The ( ) parameter is to be (True) for weldment parts, and (False) if not.
swModelExtension.CustomPropertyBuilderTemplate(False) = "-None-"
swModelExtension.CustomPropertyBuilderTemplate(False) = "template.prtprp" (your template file name here for parts)
swModelExtension.CustomPropertyBuilderTemplate(False) = "template.asmprp" (your template file name here for assemblies)
Hope this helps. It has been a great solution for us.