SfmStandardOpening (Object)

Defines Edition Techniques for Standard Openings.

Methods


Sub GetContour( oContourName, oListContourParams)
Gets Contour Information for Standard Opening.
Parameters:
oContourName
[out] The name of the Standard Opening contour for this opening.
oListContourParams
[out] A list of volatile objects (accessed through CATIAParameter) specifying Cke parameters controlling the size of this contour. The Cke parameters are retrieved using the CATIAParameter interface. These Cke parameters are normally persistent parameter objects in the model (if they have been stored), but in some cases, these may be volatile parameters. The parameters are locked if they cannot be modified.
Returns:
S_OK if everything ran ok
Example:
This Example retrieves the contour information for standard opening.
 Dim StrContourName As String
 Dim StrContourParams As SfmStandardContourParameters
 StdOpening.GetContour StrContourName, StrContourParams
 
Sub GetPositioningStrategy( oPosStrategyName, oListPosParams)
Gets the list of Position Strategy Parameters.
Parameters:
oPosStrategyName
[out] The name of the Standard Opening Position Strategy for this opening.
oListPosParams
[out] A list of the parameter group objects defining the Positioning Specification. The number and types of objects in this list depend on the Positioning Strategy name.
See also:
Returns:
S_OK if everything ran ok
Example:
This Example retrieves the Position Strategy information for existing standard opening.
 Dim StrPosStrategyName As String
 Dim StrPosStrategyParams As SfmStandardPosStrategyParameters
 StdOpening1.GetPositioningStrategy StrPosStrategyName, StrPosStrategyParams
 
Sub SetContour( iContourName, iListContourParams)
Sets Contour Information for Standard Opening.
Parameters:
iContourName
[in] The name of the Standard Opening contour for this opening.
iListContourParams
[in] A list of volatile objects (accessed through CATIAParameter) specifying Cke parameters controlling the size of this contour. The Cke parameters are retrieved using the CATIAParameter interface. These Cke parameters are normally persistent parameter objects in the model (if they have been stored), but in some cases, these may be volatile parameters. The parameters are locked if they cannot be modified.
Returns:
S_OK if everything ran ok
Example:
This Example changes the parameter values for existing opening created using "Sfm_rect" contour.
 ' First Get the Conotur.
 Dim StrContourName As String
 Dim StrContourParams As SfmStandardContourParameters
 StdOpening.GetContour StrContourName StrContourParams 
 ' Get The count
 Dim NbofParams As Long
 NbofParams = StrContourParams .Count
 ' Modify the values inside the for loop
 Dim ParamName As String
 Dim ParamValue As Parameter
 For i = 1 To NbofParams 
  Set ParamValue = StrContourParams .Item(i)
  ParamName = ParamValue.Name
  If ParamName = "Sfm_Width" Then
    ParamValue .ValuateFromString ("1000mm")
    End If
  If ParamName = "Sfm_Height" Then
    ParamValue .ValuateFromString ("1000mm")
     End If
  If ParamName = "Sfm_CornerRadius" Then
    ParamValue .ValuateFromString ("25mm")
     End If
 Next
 ' Set the contour with new values
 StdOpening.SetContour StrContourName , StrContourParams 
 
Sub SetPositioningStrategy( iPosStrategyName, iListPosParams)
Sets the Position Strategy and Positin Strategy Parameters.
Parameters:
iPosStrategyName
[in] The name of the Standard Opening Position Strategy for this opening.
iListPosParams
[in] A list of the parameter group objects defining the Positioning Specification. The number and types of objects in this list depend on the Positioning Strategy name.
See also:
Returns:
S_OK if everything ran ok
Example:
This Example modifies the Position Strategy Parameters for existing standard opening created using CATSfmPosOffsetOffset.
 'Prepare a New List for U References. The list will now contain one element.
 Dim UrefListNew As SfmReferences
 Dim UrefNew As Reference
 Set UrefNew = Part1.FindObjectByName("CROSS.95")
 UrefListNew.Add UrefNew
 'Prepare a New List for VReferences. The list will now contain one element.
 Dim VrefListNew As SfmReferences
 Dim VrefNew As Reference
 Set VrefNew = Part1.FindObjectByName("LONG.0")
 VrefListNew.Add VrefNew
 'Get Position Strategy Name and Parameters
 Dim StrPosStrategyName As String
 Dim StrPosStrategyParams As SfmStandardPosStrategyParameters
 StdOpening1.GetPositioningStrategy StrPosStrategyName, StrPosStrategyParams
 'SetPosParamData on retrieved StrPosStrategyParams. Enter new values for offset, rotation angle & reference list
 StrPosStrategyParams.SetPosParamData "CATSfmPosOffsetOffset", 40, UrefListNew, 25, UrefListNew, 30
 StdOpening1.SetPositioningStrategy StrPosStrategyName, StrPosStrategyParams
 Part1.Update