Allows access to a cam-follower mate feature.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Interface ICamFollowerMateFeatureData |
C# | |
---|
public interface ICamFollowerMateFeatureData |
C++/CLI | |
---|
public interface class ICamFollowerMateFeatureData |
Example
'VBA
'******************************************************************************
' 1. Open public_documents\samples\tutorial\api\MechanicalMates\Cam-Follower.sldasm.
' 2. Delete CamMateCoincident1 from the Mates folder in 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(-2.29201081452857E-03, 7.61655216381314E-02, 9.81125242168446E-03, -0.577381545199981, -0.577287712085548, -0.577381545199979, 2.88013169157359E-03, 2, True, 1, 0)
boolstatus = Part.Extension.SelectByRay(0, 0.0762, 0, -0.577381545199981, -0.577287712085548, -0.577381545199979, 2.88013169157359E-03, 3, True, 8, 0)
' Create CamFollowerMateFeatureData
Dim MateData As SldWorks.CamFollowerMateFeatureData
Set MateData = Part.CreateMateData(9)
' Set the Entities To Mate
Dim FirstEntityToMate As Object
Dim SecondEntityToMate As Object
Set FirstEntityToMate = Part.SelectionManager.GetSelectedObject6(1, -1)
MateData.EntitiesToMate(0) = FirstEntityToMate
Set SecondEntityToMate = Part.SelectionManager.GetSelectedObject6(2, -1)
MateData.EntitiesToMate(1) = SecondEntityToMate
' Set the Mate Alignment
MateData.MateAlignment = 2
' Create the mate
Dim MateFeature As SldWorks.Feature
Set MateFeature = Part.CreateMate(MateData)
Part.ClearSelection2 True
Part.EditRebuild3
End Sub
Example
Remarks
See Also