All Frameworks Object Hierarchy This Framework Indexes
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")
| o Func AddCutoutWithAfterFormingMode( | iContour, | |
| iDirection) As |
S_OK if everything ran ok.
' 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)
| o Func AddCutoutWithBeforeFormingMode( | iContour, | |
| iSurface) As |
S_OK if everything ran ok.
'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)
| o Func AddNibbling( | iListOfLimitingElements, | |
| iNibblingType) As |
S_OK if everything ran ok.
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")
Copyright © 2003, Dassault Systèmes. All rights reserved.