AnsweredAssumed Answered


Question asked by Ian Farquharson on May 9, 2019
Latest reply on Aug 2, 2019 by Ian Farquharson
I am experimenting with inserting new virtual parts via VBA, is there a way to specify the virtual component template used in the following?

Dim instance As IAssemblyDocDim FaceOrPlaneToSelect As System.Object Dim InsertedComponent As Component2 Dim value As System.Integer   value = instance.InsertNewVirtualPart(FaceOrPlaneToSelect, InsertedComponent)

I tried: 

swComp = "Z:\Design\Standards & Templates\Design Library\Steel\Angle.PRTDOT"

Set swModel = swApp.NewDocument(swComp, 0, 0, 0)


That works, but I would like to insert the component as a virtual part. Setting the "InsertedComponent" as the template I used in the above results in a type mismatch.