AddMate3 and swMateCOORDINATE

Hello,

i'm new in this forum and have a mating problem. I want to mate two coordinatesystems with addmate3.

This works fine with mate type swMateType_e.swMateCOINCIDENT. But if i want to set the option axis aligned (swMateType_e.swMateCOORDINATE),

the result is an error.

            assembly.AddMate3(
                (int)swMateType_e.swMateCOORDINATE,        // (long) mateTypeFromEnum Type of mate as defined in swMateType_e
                (int)swMateAlign_e.swAlignNONE,                   // (long) alignFromEnum Type of alignment as defined in swMateAlign_e
                false,                                                             // (VARIANT_BOOL) flip TRUE to flip the component, FALSE otherwise
                distance,                                                      // (double) distance Distance value to use with distance or limit mates
                distance,                                                    // (double) distAbsUpperLimit Absolute maximum distance value
                distance,                                                    // (double) distAbsLowerLimit Absolute minimum distance value
                0,                                                                 // (double) gearRatioNumerator
                0,                                                            // (double) gearRatioDenominator
                0,                                                       // (double) angle
                0,                                                            // (double) angleAbsUpperLimit
                0,                                                            // (double) angleAbsLowerLimit
                false,                                                   // (VARIANT_BOOL) ForPositioningOnly
                out longStatus                                      // Success or error as defined by swAddMateError_e
            );

Does someone know what the problem?

Thank you,

Kesenheimer

SolidworksApi macros