I have tried a few things and I'm now stuck. Here is a snippet:
Dim SwModel As ModelDoc2
Set SwModel= swApp.NewPart(sFilename, 0, 0, 0)
This sequence will manage to properly open a new part based on the part template sFilename, but then I get a message that the "Object doesn't support this property or method" on that line. I thought it was perhaps because it was a newly created item and I found some example code that did the following instead:
Dim swNewPart As PartDoc
Set swNewPart = swApp.NewPart(sFilename, 0, 0, 0)
SwModel = swNewPart
Again, it will open a new part but I get the same message on the 'set' line. It definitely evaluates the right side, but seems to hang up on the left assignment.
Am I using an incorrect object (not PartDoc or ModelDoc2)? Is there another?