Structure Detail Design

Creating Openings


Target Icon This macro shows you how to create openings on an SDD Plate. Here we will place openings on a Plate using Sketch Mode as well as 3DObject Mode.

Starting Part

Information Icon CAASddCreateOpening is launched in CATIA [1]. Some documents are needed.
  • CAASddCreateOpening.CATScript is located in the CAAScdSddUseCases module. Execute macro (Windows only).
  • The document Product1.CATProduct is located in the CAAScdSddUseCases module in the samples directory. Design_Unit_004.CATPart is linked to the previous document and contains data required for the macro.
  • The CATPart containing the section is located in the samples directory.
CAASddCreateOpening includes three steps:
  1. Prolog
  2. Get the Factory and create Opening using Sketch Mode
  3. Get the Factory and create Opening using 3DObject Mode

Prolog

The macro first loads CAASCH_Detail01.CATProduct that contains three schematic component symbols.

Set documents1 = CATIA.Documents
Set partDocument1 = documents1.Item("Design_Unit_004.CATPart")

Set part1 = partDocument1.Part
Set plate = part1.FindObjectByName("Deck_005")

Set plateref= part1.CreateReferenceFromObject(plate)

Get the Factory and create Opening using Sketch Mode

This Step describes how to get Sfm Feature Factory. The Factory object is using GetCustomerFactory Method on Part.

'Create Opening Using Sketch Mode
Set sketch= part1.FindObjectByName("Sketch.19")
Set sketchref=part1.CreateReferenceFromObject(sketch)

Set Factory =  part1.GetCustomerFactory("SfmFunctionFactory")
Set OpeningUsingSketch =Factory.CreateOpening("FunctionalOpening",1,sketchref,plateref)

part1.Update

Get the Factory and create Opening using 3DObject Mode

‘Create Opening Using 3D Object Mode
Set Object =  part1.FindObjectByName("Volume Extrude.1")
Set ObjectRef = part1.CreateReferenceFromObject(Object)

Set OpeningUsing3DObj  = Factory.CreateOpening("FunctionalOpening",0,ObjectRef, plateref)

part1.Update

Resulting Part with Openings

  End Icon

[Top]


In Short

This use case has shown how to create openings using Sketch and 3DObject Mode Plate.

[Top]


References

[1] Replaying a Macro
[Top]

Copyright © 2010, Dassault Systèmes. All rights reserved.