How to assemble the screwdriver in the right way

Hello,

I'm trying to assemble a screwdriver with a screw using Vb.net in solidworks, but, it assembled in the wrong way as you see in this figure.

To assemble its, i used the coicidence between the axis and the face of to parts.

Hello, have you tried to flip mate using AddMate5 :
Two of the parameters can acheive what you need on the coincidence

AlignFromEnum : try 0 or 1
Flip : Try "True" or "False"

Instance.AddMate5(MateTypeFromEnum, AlignFromEnum, Flip, Distance, DistanceAbsUpperLimit, DistanceAbsLowerLimit, GearRatioNumerator, GearRatioDenominator, Angle, AngleAbsUpperLimit, AngleAbsLowerLimit, ForPositioningOnly, LockRotation, WidthMateOption, ErrorStatus)

1 Like

Hello, i used this code to make a mate:

swAssemblyDoc.AddMate3(swMateType_e.swMateCOINCIDENT, swMateAlign_e.swMateAlignALIGNED, False, 0, 0, 0, 0, 0, 0, 0, 0, 0, False, mateError)

i tried to change AlignALIGNED by AlignFromEnum, but, i didn't find it.

 

Hello

replaces swMateAlignALIGNED with swMateAlignANTI_ALIGNED, see HERE.

Kind regards

1 Like

Hello and thank you for your help,