Allows access to a sheet metal gusset feature.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Interface ISMGussetFeatureData |
C# | |
---|
public interface ISMGussetFeatureData |
C++/CLI | |
---|
public interface class ISMGussetFeatureData |
Example
'VBA
'----------------------------------------------------------------------------
' Preconditions:
' 1. Open public_documents\samples\tutorial\api\SMGussetAPI.sldprt.
' 2. Open an Immediate window.
'
' Postconditions:
' 1. Inserts Sheet Metal Gusset1.
' 2. Press F5 and observe the modified gusset.
' 3. Inspect the Immediate window for the flatten settings of the gusset.
' 4. Expand Flat-Pattern in the FeatureManager design tree, right-click
' Flat-Pattern(1), and click Unsuppress.
' 5. Observe the center mark and profile of the gusset in its
' flattened state.
'
' NOTE: Because the model is used elsewhere, do not save changes.
' ---------------------------------------------------------------------------
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim myFeature As SldWorks.Feature
Dim swFeat As SldWorks.Feature
Dim swFeatData As SldWorks.SMGussetFeatureData
Dim boolstatus As Boolean
Option Explicit
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("", "FACE", -5.38403893476698E-02, 3.6701308754914E-03, 0.05530817474488, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "FACE", -1.77780871801474E-02, -3.07393226379986E-02, 3.41128529187245E-02, True, 0, Nothing, 0)
Set swFeatData = Part.FeatureManager.CreateDefinition(swFeatureNameID_e.swFmSMGusset)
swFeatData.UseOffset = True
swFeatData.OffsetDistance = 0.05
swFeatData.FlipOffset = False
swFeatData.ProfileDimensionScheme = swSheetMetalGussetProfileDimType_e.swSheetMetalGussetProfileDimType_IndentDepth
swFeatData.IndentDepth = 0.01
swFeatData.ProfileLengthDim = 0#
swFeatData.UseAngleDimForProfile = False
swFeatData.ProfileHeightDim = 0#
swFeatData.ProfileAngleDim = 0#
swFeatData.FlipDimSides = False
swFeatData.IndentWidth = 0.01
swFeatData.GussetThickness = 0.003
swFeatData.DraftAngle = 3 * 0.0175
swFeatData.DraftSideFaces = True
swFeatData.FilletInnerCorners = True
swFeatData.InnerCornerFilletRadius = 0.002
swFeatData.FilletOuterCorners = True
swFeatData.OuterCornerFilletRadius = 0.001
swFeatData.GussetType = swSheetMetalRibGussetType_e.swSheetMetalRibGussetType_Rounded
swFeatData.FilletGussetEdges = False
swFeatData.EdgeFilletRadius = 0#
swFeatData.OverrideDocSettings = True
swFeatData.ShowProfile = True
swFeatData.ShowCenter = True
Set myFeature = Part.FeatureManager.CreateFeature(swFeatData)
Part.ClearSelection2 True
Stop
'Modify type, draft, and outer corner fillet properties of the gusset
boolstatus = Part.Extension.SelectByID2("Sheet Metal Gusset1", "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
Set swFeat = Part.SelectionManager.GetSelectedObject6(1, -1)
Set swFeatData = swFeat.GetDefinition
swFeatData.AccessSelections Part, Nothing
swFeatData.GussetType = swSheetMetalRibGussetType_e.swSheetMetalRibGussetType_Flat
swFeatData.DraftSideFaces = False
swFeatData.FilletOuterCorners = False
Debug.Print "Sheet Metal Gusset1 Flatten Settings"
Debug.Print " Override document flat pattern properties? " & swFeatData.OverrideDocSettings
Debug.Print " Show center marks of the gusset in its flattened state? " & swFeatData.ShowCenter
Debug.Print " Show profile of the gusset in its flattened state? " & swFeatData.ShowProfile
swFeat.ModifyDefinition swFeatData, Part, Nothing
swFeatData.ReleaseSelectionAccess
End Sub
Example
Remarks
Accessors
Access Diagram
See Also