I was planning on naming some faces in order to help with mating. I need to insert both parts and assemblies, and mate faces on each. Here is roughy what I am trying to do, this time inserting a part into :
Dim Asm As SldWorks.AssemblyDoc Dim Comp As SldWorks.Component2 Dim PardDoc As SldWorks.PartDoc Dim ComponentPart As SldWorks.ModelDoc2 Dim Face As SldWorks.face2
Set Asm = swApp.ActiveDoc Set Comp = Asm.AddComponent4("C:\MyPart.SLDPRT", "",0,0,0) Set ComponentPart = Comp.GetModelDoc set PartDoc = ComponentPart
Set Face = PartDoc.GetEntityByName("CoincidentFace", _ SwConst.swSelectType_e.swSelFACES)
Face.Select4(false,true)
The select call fails (returns false), but GetEntityByName does actually return a face. Does anyone know why Select4 from the entity is not working?
Thanks,
Brian