Allows access to a table-driven pattern feature.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Interface ITablePatternFeatureData |
C# | |
---|
public interface ITablePatternFeatureData |
C++/CLI | |
---|
public interface class ITablePatternFeatureData |
Example
'VBA
' ******************************************************************************
' 1. Open public_documents\samples\tutorial\api\tablepattern.sldprt.
' 2. Delete TPattern1.
' 3. Run the macro.
' 4. Creates a new TPattern1.
' 5. Inspect the FeatureManager design tree and the graphics area.
' ******************************************************************************
Dim swApp As SldWorks.SldWorks
Dim swFeatData As TablePatternFeatureData
Dim Part As SldWorks.ModelDoc2
Dim swFeat As Feature
Dim swFeatMgr As FeatureManager
Dim boolstatus As Boolean
Option Explicit
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Coordinate System1", "COORDSYS", 0, 0, 0, True, 16, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Cut-Extrude1", "BODYFEATURE", 0, 0, 0, True, 4, Nothing, 0)
Part.ActivateSelectedFeature
Dim swPointArray() As Double
ReDim swPointArray(0 To 5) As Double
swPointArray(0) = 0.04
swPointArray(1) = 0
swPointArray(2) = 0
swPointArray(3) = -0.025
swPointArray(4) = 0
swPointArray(5) = 0
Set swFeatMgr = Part.FeatureManager
Set swFeatData = swFeatMgr.CreateDefinition(swFmTablePattern)
swFeatData.GeometryPattern = False
swFeatData.PointArray = swPointArray
swFeatData.PropagateVisualProperty = True
swFeatData.UseCentroid = True
Set swFeat = swFeatMgr.CreateFeature(swFeatData)
End Sub
Example
Remarks
Accessors
See Also