Allows access to a rack and pinion mate feature.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Interface IRackPinionMateFeatureData |
C# | |
---|
public interface IRackPinionMateFeatureData |
C++/CLI | |
---|
public interface class IRackPinionMateFeatureData |
Example
'VBA
' ******************************************************************************
' 1. Open public_documents\samples\tutorial\api\MechanicalMates\Rack And Pinion.sldasm.
' 2. Delete RackPinionMate1 from the Mates folder of the FeatureManager design tree.
' 3. Run the macro.
' 4. Inspect the Mates folder in the FeatureManager design tree.
' ******************************************************************************
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Option Explicit
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByRay(-4.63518983485187E-02, 0.061012999696942, -6.42963015610576E-03, -0.398796540128449, 0.236369842894561, -0.886053393962, 7.98486578462134E-04, 1, True, 64, 0)
boolstatus = Part.Extension.SelectByRay(7.90589165686129E-03, -9.93915877270979E-03, -4.38167267822109E-03, -0.398796540128449, 0.236369842894561, -0.886053393962, 7.98486578462134E-04, 2, True, 128, 0)
' Create RackPinionMateFeatureData
Dim MateData As SldWorks.RackPinionMateFeatureData
Set MateData = Part.CreateMateData(13)
' Set the mate diameter type
MateData.DiameterType = 0
' Set the mate diameter value
MateData.DiameterVal = 0.0254
' Set the mate orientation direction
MateData.Reverse = False
' Create the mate
Dim MateFeature As SldWorks.Feature
Set MateFeature = Part.CreateMate(MateData)
Part.ClearSelection2 True
Part.EditRebuild3
End Sub
Example
Remarks
See Also