-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.create_section
fabian-flassig edited this page Mar 30, 2026
·
3 revisions
Creates a section from a selection of parts and groups.
pytha.create_section(elements [, options])| Parameter | Type | Description |
|---|---|---|
elements |
element_handle or { element_handle* }
|
Parts and groups that define the section scope |
options |
table (optional)
|
Section plane and naming options |
| Type | Description |
|---|---|
element_handle or nil
|
A handle to the created section. nil if operation failed |
The options table can contain one or more of the following keys:
| Property | Type | Description |
|---|---|---|
plane |
string |
Section plane: "xy", "xz", "yz", "-xy", "-xz" or "-yz"
|
position |
{number, number, number} |
A point through which the section plane passes |
angle |
number |
Additional section angle to rotate the plane around. |
rotation |
number |
Rotation of the section representation in 90° steps |
name |
string |
Section name |
local section = pytha.create_section(parts, {
plane = "xz",
position = {0, 0, 500},
name = "Section A"
})The function creates a section that can be inserted on a plot page.
If elements resolves to an empty part selection, all model parts are used.
If position is given, the section plane is positioned through that point. Otherwise the default position prepared by the internal section logic is used.
If name is omitted, an automatic section name is generated.
The function returns a section handle.
Minimum PYTHA Version: V26
pytha.delete_section, pytha.update_section, pyplot.insert_section