 |
CAASddEditPlate includes nine steps:
- Prolog
- Retrieving the Factory from the Part Document
- Getting the Manager from the Factory
- Retrieving the Super Plates
- Retrieving the Split Plates of the Seamed Shell Super Plate
- Modifying the Split Plates Retrieved (Child Plate)
- Retrieving and Modifying the Deck Plate
- Retrieving and Modifying the Transverse Bulkhead
- Updating the Part Document

Opens the CAASddEditPlate.CATPart in CATIA.
Sub CATMain()
Dim ObjPart As Part
Set ObjPart = CATIA.ActiveDocument.Part
...
|
This step describes how to get Structure Functional Modeler factory object.
...
Dim FactoryObj As SfmFactory
Set FactoryObj = ObjPart.GetCustomerFactory("SfmFactory")
...
|
This step describes how to get the SfmManager object.
...
Dim ManagerObj As SfmManager
Set ManagerObj = FactoryObj.GetManager
...
|
This step describes how to get the plate collection and how to get one specific item in it.
...
Dim SuperPlates As References
Set SuperPlates = ManagerObj.GetSuperPlates
Dim ShellSuperPlate1, ShellSuperPlate2, DeckSuperPlate, TBHSuperPlate As SfmSuperPlate
Set ShellSuperPlate1 = SuperPlates.Item(1)
Set ShellSuperPlate2 = SuperPlates.Item(2)
Set DeckSuperPlate = SuperPlates.Item(3)
Set TBHSuperPlate = SuperPlates.Item(4)
...
|
This step describes how to get the child split plate of ShellSuperPlate1.
...
Dim ShellSplitPlateRefs As References
Set ShellSplitPlateRefs = ShellSuperPlate1.SplitPlates
Dim ShellSplitPlateRef1, ShellSplitPlateRef2 As Reference
Set ShellSplitPlateRef1 = ShellSplitPlateRefs.Item(1)
Set ShellSplitPlateRef2 = ShellSplitPlateRefs.Item(2)
Set SelectionObj = CATIA.ActiveDocument.Selection
SelectionObj.Add ShellSplitPlateRef1
Dim ShellSplitPlate1 As SfmSuperPlate
Set ShellSplitPlate1 = SelectionObj.FindObject("CATIASfmSuperPlate")
...
|
First, we are retrieving the thickness, material, and grade of the child plate,
and then we modify them.
...
Dim Thickness1 As Double
Dim material1 As String
Dim grade1 As String
ShellSplitPlate1.GetSplitPlateAttributes 1, Thickness1, material1, grade1
ShellSplitPlate1.SetSplitPlateAttributes 1, 30, "Steel", "A42"
...
|
...
SelectionObj.Add DeckSuperPlate
Dim DeckPlate As SfmSuperPlate
Set DeckPlate = SelectionObj.FindObject("CATIASfmSuperPlate")
Dim DeckSupport As Reference
Set DeckSupport = DeckPlate.Support
DeckPlate.SupportOffSet = "30.0"
Dim DeckSupportOffSet As Double
DeckSupportOffSet = DeckPlate.SupportOffset
Dim LimitMode As Long
LimitMode = DeckPlate.LimitMode
Dim DeckPlateLimits As References
Set DeckPlateLimits = DeckPlate.Limits
...
|
...
SelectionObj.Add TBHSuperPlate
Dim TBHPlate As SfmSuperPlate
Set TBHPlate = SelectionObj.FindObject("CATIASfmSuperPlate")
Dim TBHPlateLimits As References
Set TBHPlateLimits = TBHPlate.Limits
TBHPlate.SetAsLastLimit (2)
Dim TBHPlateNewLimit As AnyObject
Set TBHPlateNewLimit = ObjPart.FindObjectByName("LONG.5")
Dim TBHPlateNewLimitRef As Reference
Set TBHPlateNewLimitRef = ObjPart.CreateReferenceFromObject(TBHPlateNewLimit)
Dim TBHPlateNewOrnt As Long
TBHPlateNewOrnt = 4
TBHPlate.AddLimit TBHPlateNewLimitRef, TBHPlateNewOrnt
TBHPlate.InvertLimit (4)
Dim TBHPlateSupport As Reference
Set TBHPlateSupport = TBHPlate.Support
Dim TBHPlateNewSupport As AnyObject
Set TBHPlateNewSupport = ObjPart.FindObjectByName("CROSS.100")
Dim TBHPlateNewSupportRef As Reference
Set TBHPlateNewSupportRef = ObjPart.CreateReferenceFromObject(TBHPlateNewSupport)
TBHPlate.Support = TBHPlateNewSupportRef
Dim TBHPlateCategory As String
TBHPlateCategory = TBHPlate.Category
Dim TBHPlateThickness As Double
TBHPlateThickness = TBHPlate.Thickness
Dim TBHPlateMaterial, TBHPlateGrade As String
TBHPlateMaterial = TBHPlate.Material
TBHPlateGrade = TBHPlate.Grade
TBHPlate.Material = "Steel"
TBHPlate.Grade = "A45"
TBHPlate.Thickness = "35.0"
...
|
The Part has to be updated to generate the geometrical representations of the modified objects.
Once this done, the updated objects are visible in the 3D window and in the specification tree.
...
ObjPart.Update
End Sub
|
|