DMU Space Analysis

Creating a Network of Sections


This macro shows you how to use sections to create a network of sections. The macro assumes that a CATProduct has been loaded.

This image shows the product before the use of the macro :

 

This image shows the result of the macro :

 

CAASpaSectionNetwork is launched in CATIA [1]. A previously opened document is needed.

CAASpaSectionNetwork.CATScript is located in the CAAScdDmuUseCases module. Execute macro (Windows only).

 

CAASpaSectionNetwork includes several steps:

  1. Retrieving the sections collection
  2. Management of a master section
  3. Creation of the network

Retrieving the sections collection

The cSections collection (see Sections ) is the factory to create Section object : this collection is retrieved using the GetTechnologicalObject method, with the string "Sections", on the root product of the active document.

Management of a master section

The master section will be used to compute position and size of the network.

The oMasterSection object is created using Add method on the cSections collection to take into account all components.

The Position matrix is retrieved using Position method on the oMasterSection object and the size is read using Height and the Width methods.

The oMasterSection object is removed using Remove method on the cSections collection.

Creation of the network

A loop is done to create ten oSection objects using Add method on the cSections collection.

The type of the section is forced using Type and the position is modified using Position method on the oSection object.

[Top]


In Short

This use case has shown how to use sections in order to create a network of sections. Specifically, it has illustrated how to :

[Top]


References

[1] Replaying a Macro
[2] Space Analysis automation objects

[Top]


DMU Navigator Home DMU Space Analysis Home DMU Kinematics Simulation Home

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