Locks or freezes a selected feature.
.NET Syntax
Visual Basic (Declaration) | |
---|
Function InsertFeatureLock() As Feature |
Visual Basic (Usage) | |
---|
Dim instance As IFeatureManager
Dim value As Feature
value = instance.InsertFeatureLock() |
C# | |
---|
Feature InsertFeatureLock() |
C++/CLI | |
---|
Feature^ InsertFeatureLock(); |
Return Value
IFeature
Example
'VBA
' Preconditions:
' 1. Open a part.
' 2. Select a feature.
' Postconditions: Observe that the selected feature is locked, and a gold freeze bar appears after the feature in the FeatureManager design tree.
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFeat, swLockFeat As SldWorks.Feature
Dim swFeatMgr As SldWorks.FeatureManager
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swFeatMgr = swModel.FeatureManager
Set swFeat = swSelMgr.GetSelectedObject6(1, -1)
Set swLockFeat = swFeatMgr.InsertFeatureLock
End Sub
Remarks
See Also