Structure Functional Design

Creating an SDD Design Unit


This macro shows you how to create a SDD Design unit from scratch. This Design unit then can be used to design SDD features.

CAASddCreateSDDUnit is launched in CATIA [1]. There is no need to open any Part or Product documents to run this macro.

CAASddCreateSDDUnit.CATScript is located in the CAAScdSddUseCases. Execute macro (Windows only).

CAASddCreateSDDUnit includes ten steps:

  1. Creating a Product Document
  2. Retrieving the Product Root Object from the Product Document
  3. Selecting the Product Document
  4. Adding the Product to the Selection
  5. Getting the SDD Product from the Created Product
  6. Creating the SDD Design Unit Part
  7. Retrieving the Factory from the SDD Part
  8. Retrieving the Manager from the Factory
  9. Adding the Hull Surface
  10. Creating a Shell Plate using the Hull Surface
  11. Updating the Part Document

Creating a Product Document

Sub CATMain()
  'Create a Product Document
  Dim NewProdDoc As ProductDocument
  Set NewProdDoc = CATIA.Documents.Add("Product")
  ...

Retrieving the Product Root Object from the Product Document

  ...
  'Get the Product from Product Document
  Dim RootPrd As Product
  Set RootPrd = NewProdDoc.Product
  ...

Selecting the Product Document

  ...
  'Select the Product Document
  Dim SelectionObj As Selection
  Set SelectionObj = NewProdDoc.Selection
  ...

Adding the Product to the Selection

  ...
  SelectionObj.Add RootPrd
  ...

Getting the SDD Product from the Created Product

  ...
  'Create a SDD product by finding its selection
  Dim SddProductObj As SddProduct
  Set SddProductObj = SelectionObj.FindObject("CATIASddProduct")
  ...

Creating the SDD Design Unit Part

  ...
  'Create a SDD Design Unit
  Dim sddpart As Part
  Set sddpart = SddProductObj.CreateDesignUnit
  ...

Retrieving the Factory from the SDD Part

  ...
  'Retrieve the Factory from the SDD System part
  Dim FactoryObj As SfmFactory
  Set FactoryObj = sddpart.GetCustomerFactory("SfmFactory")
  ...

Retrieving the Manager from the Factory

  ...
  'Retrieve the Manager from the Factory
  Dim ManagerObj As SfmManager
  Set ManagerObj = FactoryObj.GetManager
  ...

Adding the Hull Surface

  ...
  'Add Hull Using Manager
  ManagerObj.AddHull
  ...

Creating a Shell Plate using the Hull Surface

The following script is common to Structure Functional Design and Structure Detail Design.

  ...
  'Define Shell Plate Support
  Dim ShellSupport As AnyObject
  Set ShellSupport = sddpart.FindObjectByName("Hull1234")
  Dim ShellSupportRef As Reference
  Set ShellSupportRef = sddpart.CreateReferenceFromObject(ShellSupport)
  
  Dim ShellSuperplate1 As SfmSuperPlate
  Set ShellSuperplate1 = FactoryObj.AddSuperPlate("ShellPanel", ShellSupportRef, Nothing)

  'Define Limit
  Dim ShellPlateLimit As AnyObject
  Set ShellPlateLimit = sddpart.FindObjectByName("LONG.0")
  Dim ShellPlateLimitRef As Reference
  Set ShellPlateLimitRef = sddpart.CreateReferenceFromObject(ShellPlateLimit)
  
  'Define Orientation of Third Limit
  Dim ShellPlateOrnt As Long
  ShellPlateOrnt = 5
  ShellSuperplate1.AddLimit ShellPlateLimitRef, ShellPlateOrnt
  ShellSuperplate1.Thickness = "1.0"
  ShellSuperplate1.Run
  sddpart.Update
  ...

Updating the Part Document

 ...
  'To Updating CATIA Part Document
  sfdpart.Update
End Sub

[Top]


In Short

This use case has shown how to create SDD Design unit and features inside it.


References

[1] Replaying a Macro
[Top]

Copyright © 1999-2011, Dassault Systèmes. All rights reserved.