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 « J'aime »

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, False, mateError)

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

 

Bonjour,

remplace swMateAlignALIGNED par swMateAlignANTI_ALIGNED, voir ICI.

Cordialement,

1 « J'aime »

Bonjour et merci pour votre aide,