SfmOpeningContoursMgr (Object)

Gets CATIASfmOpeningContoursMgr.
Use this manager to GetAvailableStdOpeningContours & GetStdOpeningContourParams.
Example
:
Retrives the Manager from factory
  'Get the Factory
  Set Factory =  part1.GetCustomerFactory("SfmFunctionFactory")
  'Retrieve the Contour Manager
  Dim ObjSfmContourMgr As SfmOpeningContoursMgr
  Set ObjSfmContourMgr = Factory.GetOpeningMgr(Part1, "SfmOpeningContoursMgr")
 

Methods


Sub GetAvailableStdOpeningContours( oListContourNames)
Get The list of Available Contours.
Parameters:
oListContourNames
[out] Available Contour names
Returns:
S_OK if everything ran ok
Example
:
The Example demonstrates how to see available contours. Choose the required contour from the list.
  'Get the Factory
  Set Factory =  part1.GetCustomerFactory("SfmFunctionFactory")
  'Get the Contour Manager
  Dim ObjSfmContourMgr As SfmOpeningContoursMgr
  Set ObjSfmContourMgr = Factory.GetOpeningMgr(Part1, "SfmOpeningContoursMgr")
  'Get The List of Available Contours
  Dim oListContourNames() As Variant
  ObjSfmContourMgr.GetAvailableStdOpeningContours oListContourNames
  'Display The List of Available Contours
  Dim NbOfContour As Long
  NbOfContour = UBound(oListContourNames)
  Display List of contours
  For i = 0 To NbOfContour
  MsgBox oListContourNames(i)
  Next
 
Func GetStdOpeningContourParams( iContourName) As
Get The list of Parameters for a selected Contour Name.The list varies depending on the type of contour.
Parameters:
iContourName
[in] Contour names for which parameters need to be set.
oListCkeParms
[out] List of Parameters.
Returns:
S_OK if everything ran ok
Example
:
The Example demonstartes what parameters are required to be set for a chosen contour.Here "Sfm_Rect" is the chosen contour.
  'Retrieve the Factory
  Set Factory =  part1.GetCustomerFactory("SfmFunctionFactory")
  'Retrieve the Contour Manager
  Dim ObjSfmContourMgr As SfmOpeningContoursMgr
  Set ObjSfmContourMgr = Factory.GetOpeningMgr(Part1, "SfmOpeningContoursMgr")
  ' Enter Contour Name for which Parameter values need to be set
  Dim oListCkeParms As SfmStandardContourParameters
  Set oListCkeParms = ObjSfmContourMgr.GetStdOpeningContourParams("Sfm_Rect")
 'Display List of Parameters for Selected Contour
  Dim NbOfParam As Long
  NbOfParam = oListCkeParms.Count
  Dim ContourParam As Parameter
  Dim ContourParamName As String
  For i = 1 To NbOfParam
  Set ContourParam = oListCkeParms.Item(i)
  ContourParamName = oListCkeParms.Item(i).Name
  MsgBox ContourParamName
 'Set Contour Parameter Values
 If ContourParamName = "Sfm_Width" Then
   ContourParam.ValuateFromString ("1000mm")
   End If
 If ContourParamName = "Sfm_Height" Then
  ContourParam.ValuateFromString ("5000mm")
   End If
 If ContourParamName = "Sfm_CornerRadius" Then
  ContourParam.ValuateFromString ("10mm")
   End If
   Next