AssemblyDoc::EditMate2 and second parameter AlignFromEnum
Artem Taturevych, Application Engineer at Intercad (Australia)
translationXpert – add-in to translate SolidWorks models
myIntercad – an integrated tool for SolidWorks Professionals
Like Artem said, you need to use IAssemblyDoc::EditMate2, but I also wanted to point out that there's some techniques that can be used with the plane normal vectors to make sure you always have the desired alignment. I discuss this here --- Mating Automation Techniques: Pros and Cons
@Artem Thank you very much it works
@Keith Thanks nice website it's very useful for API programmers.