Skip to main content
Ctrl+K
PyACP - Home PyACP - Home
  • PyACP home
  • Getting started
  • User guide
  • Examples
  • API reference
    • Contribute
Ctrl+K
dev0.2 (stable)0.1
  • GitHub
Ctrl+K
  • PyACP home
  • Getting started
  • User guide
  • Examples
  • API reference
  • Contribute
dev0.2 (stable)0.1
  • GitHub

Section Navigation

Contents

  • How-to guides
    • Create input file for PyACP
    • Visualize model
    • View model in ACP GUI
    • Print model tree
    • Copy tree objects
    • Manage input and output files
    • Change ACP startup
  • Concepts
  • Compatibility
  • Security considerations
  • PyAnsys
  • User guide
  • How-to guides
  • Print model tree

Print model tree#

A tree structure gives an overview of an ACP model. To print a model’s tree structure, start with a Model instance:

>>> model
<Model with name 'ACP Model'>

You can print the tree structure using the print_model() function:

>>> pyacp.print_model(model, show_lines=True)
'ACP Model'
├── Materials
│   └── 'Structural Steel'
├── Fabrics
│   └── 'Fabric.1'
├── Element Sets
│   └── 'All_Elements'
├── Edge Sets
│   └── 'ns_edge'
├── Rosettes
│   └── 'Global Coordinate System'
├── Oriented Selection Sets
│   └── 'OrientedSelectionSet.1'
└── Modeling Groups
    └── 'ModelingGroup.1'
        └── Modeling Plies
            └── 'ModelingPly.1'
                └── Production Plies
                    └── 'P1__ModelingPly.1'
                        └── Analysis Plies
                            └── 'P1L1__ModelingPly.1'

Alternatively, you can use get_model_tree() to get a tree representation. This allows manually iterating over the tree structure:

>>> tree_root = pyacp.get_model_tree(model)
>>> tree_root.label
"'ACP Model'"
>>> for child in tree_root.children:
...     print(child.label)
...
Materials
Fabrics
Element Sets
Edge Sets
Rosettes
Oriented Selection Sets
Modeling Groups

The hide_empty label can be set to False to also show empty groups:

>>> pyacp.print_model(model, hide_empty=False, show_lines=True)
'ACP Model'
├── Materials
│   └── 'Structural Steel'
├── Fabrics
│   └── 'Fabric.1'
├── Stackups
├── Sublaminates
├── Element Sets
│   └── 'All_Elements'
├── Edge Sets
│   └── 'ns_edge'
├── Cad Geometries
├── Virtual Geometries
├── Rosettes
│   └── 'Global Coordinate System'
├── Lookup Tables 1d
├── Lookup Tables 3d
├── Parallel Selection Rules
├── Cylindrical Selection Rules
├── Spherical Selection Rules
├── Tube Selection Rules
├── Cut Off Selection Rules
├── Geometrical Selection Rules
├── Variable Offset Selection Rules
├── Boolean Selection Rules
├── Oriented Selection Sets
│   └── 'OrientedSelectionSet.1'
├── Modeling Groups
│   └── 'ModelingGroup.1'
│       ├── Modeling Plies
│       │   └── 'ModelingPly.1'
│       │       └── Production Plies
│       │           └── 'P1__ModelingPly.1'
│       │               └── Analysis Plies
│       │                   └── 'P1L1__ModelingPly.1'
│       ├── Interface Layers
│       └── Butt Joint Sequences
├── Imported Modeling Groups
├── Sampling Points
├── Section Cuts
├── Solid Models
├── Imported Solid Models
├── Sensors
└── Field Definitions

previous

View model in ACP GUI

next

Copy tree objects

  • Show Source

© Copyright (c) 2025 ANSYS, Inc. All rights reserved.

Created using Sphinx 8.1.3.

Built with the Ansys Sphinx Theme 1.4.4.
Last updated on May 22, 2025