The factory is retrieved using the StrPlate or StrMember
- Example:
-
The following example retrieves the Feature factory object from the Selection on ActiveDocument.
Dim Plate As StrPlate Set Plate = strPlates.Item("Plate_007") Dim Sel As Selection Set Sel = CATIA.ActiveDocument.Selection ' Use the Add method to add Plate to selection Sel.Add Plate Dim Factory As StrFeatureFactory Set Factory = Sel.FindObject("CATIAStrFeatureFactory")Methods
- Func AddCutoutWithAfterFormingMode( iContour, iDirection) As
-
Adds a Cutout Feature on Plate/Member using AfterForming Mode.
- Parameters:
-
- iContour
- [in] The Sketch used to create the cutout. This must exist in the document. dd>
- iDirection
- [in] The direction in which the cutout should be created. Valid inputs are line created in sketch,3D Line. dd>
- oCutout[out]
- The CutOut Feature dd>
- @return
-
S_OKif everything ran ok.- Example :
-
This example creates Cutout on Plate.
' Define the Plate on which cutout is to be created Dim strPlates As strPlates Set strPlates = rootProduct.GetTechnologicalObject("StructurePlates") Dim PlateToCut As StrPlate Set PlateToCut = strPlates.Item("Plate_012") ' Add the Plate to Selection Dim Sel As Selection Set Sel = CATIA.ActiveDocument.Selection Sel.Add PlateToCut 'Get The factory from selection Dim Factory As StrFeatureFactory Set Factory = Sel.FindObject("CATIAStrFeatureFactory") ' Select the Sketch profile exisitng in the document Dim sketch As Reference Set sketch = rootProduct.CreateReferenceFromName("Product1/Grid/!Sketch.1") ' Select the direction in which the cutout should be created Dim dir1 As Reference Set dir1 = rootProduct.CreateReferenceFromName("Product1/Grid/!Sketch.2") ' Create cutout Dim Cutout1 As StrCutoutFeature Set Cutout1 = Factory.AddCutoutWithAfterFormingMode(sketch, dir1)dd>
- Func AddCutoutWithBeforeFormingMode( iContour, iSurface) As
-
Adds a Cutout Feature on Plate/Member using BeforeForming Mode.
- Parameters:
-
- iContour
- [in] The Sketch used to create the cutout. This must exist in the document dd>
- iSurface
- [in] A Surface on which Plate/Member is created. dd>
- oCutout[out]
- The CutOut Feature dd>
- @return
-
S_OKif everything ran ok.- Example :
-
This example creates Cutout on Member.
'Define the Plate on which cutout is to be created Dim strPlates As strPlates Set strPlates = rootProduct.GetTechnologicalObject("StructurePlates") Dim PlateToCut As StrPlate Set PlateToCut = strPlates.Item("Plate_012") ' Add the Plate to Selection Dim Sel As Selection Set Sel = CATIA.ActiveDocument.Selection Sel.Add PlateToCut ' Get The factory from selection Dim Factory As StrFeatureFactory Set Factory = Sel.FindObject("CATIAStrFeatureFactory") ' Select the Sketch profile exisitng in the document Dim sketch As Reference Set sketch = rootProduct.CreateReferenceFromName("Product1/Grid/!Sketch.1") ' Select the surface Dim Surface1 As Reference Set Surface1 = rootProduct.CreateReferenceFromName("Product1/Grid/!Extrude.1") ' Create cutout Dim Cutout1 As StrCutoutFeature Set Cutout1 = Factory.AddCutoutWithBeforeFormingMode(sketch, Surface1)dd>
- Func AddNibbling( iListOfLimitingElements, iNibblingType) As
-
Adds a Coping on Plate or Member.
- Parameters:
-
- iListOfLimitingElements
- [in] List of Limiting elements used for limiting the Plate/Member. Pass only one limit at a time. dd>
- iNibblingType
- [in] Possible Values for Plate:"Remove". Possible Values for Member:"Remove","ShortPoint","LongPoint","WeldCut". For Defining further attributes refer CATIAStrNibblingFeature. dd>
- oNibblingFeature[out]
- The Nibbled Plate/Member. dd>
- @return
-
S_OKif everything ran ok.- Example :
-
This example creates Coping on Plate.
Dim Limitplate1 As StrPlate Set Limitplate1 = strPlates.Item("Plate_008") Dim Listoflimits As Variant Set Listoflimits(0) =Limitplate1 Dim NibblingFeature As StrNibblingFeature Set NibblingFeature = Factory.AddNibbling(Listoflimits, "Remove")dd>