AnsweredAssumed Answered

Solidworks API AddMate3 Concentricity will not create

Question asked by Danny Bradford on Jul 15, 2016
Latest reply on Jul 22, 2016 by Danny Bradford

Greetings all,

 

I need to create a concentricity mate between a hole and an axis. Below is the code that selects and should create the Mate. The selections work, I can see that, however the mate will not create.

 

            FirstSelection = "Axis3@" & Part.Name2 & "@" & AssemblyName

 

            Full_feature_name = the_hole.Name & "@" & select_string

 

            boolstat = swDocExt.SelectByID2(Full_feature_name, "BODYFEATURE", 0, 0, 0, True, 1, Nothing, swSelectOption_e.swSelectOptionDefault)

            boolstat = swDocExt.SelectByID2(FirstSelection, "AXIS", 0, 0, 0, True, 1, Nothing, swSelectOption_e.swSelectOptionDefault)

 

            matefeature(0) = swAssembly.AddMate3(swMateType_e.swMatePARALLEL, swMateAlign_e.swMateAlignCLOSEST, False, 0, 0, 0, 0, 0, 0, 0, 0, False, mateError)

 

This code uses the same variables to create other mates so I am fairly sure they are good. Also, the mateError returns a 0.

 

I am building this in VB.NET and we are running Solidworks 2015 SP02.

 

Any help and direction is greatly appreciated.

 

Thanks in advance for your time and attention.

Outcomes