User Scripts

User created scripts that are more advanced than the Examples.

Index

CREATE BOUNDING BOX

CREATE SCREENSHOTS OF PARTS AND PRODUCTS

CREATE LINES NORMAL TO SURFACE

CREATE PARAMETERS FROM YAML

DRAWING TEMPLATE

POINT COORDINATES RELATIVE TO AXIS SYSTEM

RENAME INSTANCES IN PRODUCT

SAVE DRAWINGS TO PDF

WING SURFACE FROM NACA PROFILE

CREATE BOUNDING BOX

Creates a bounding box around the selected Body using the selected AxisSystem to orientate the bounding box.

See script header for more information.

create_bounding_box.py

CREATE SCREENSHOTS OF PARTS AND PRODUCTS

Creates screenshots of all parts and products within a given directory.

See script header for more information.

create_screenshots_of_parts_and_products.py

CREATE LINES NORMAL TO SURFACE

Creates lines normal to surface using all the points in the selected Geometrical Set.

Image showing surface and points.

_images/lines_normal_surface_1.png

Image showing lines after script has been run.

_images/lines_normal_surface_2.png

See script header for more information.

create_lines_normal_to_surface.py

CREATE PARAMETERS FROM YAML

Creates parameter sets and parameters based on the contents of a YAML file.

Great for creating complex parameter structures.

See script header for more information.

_images/parameters.png

create_parameters_from_yaml.py

DRAWING TEMPLATE

Creating a drawing template in the background view.

See script header for more information.

_images/DrawingTemplate.png

drawing_template.py

POINT COORDINATES RELATIVE TO AXIS SYSTEM

Get the point coordinates relative to an axis system.

See script header for more information.

coords_relative_to_axis_system.py

RENAME INSTANCES IN PRODUCT

Sequentially renames the instances of products within a selected product.

See script header for more information.

rename_instances_in_product.py

SAVE DRAWINGS TO PDF

Loops through all the files (.CATDrawing) of a given directory and saves to PDF.

For CATDrawings the Document.export_data() method exports each sheet to a single PDF. This script uses pypdf to merge these single sheets into a single pdf for each drawing.

See script header for more information.

save_drawings_to_pdf.py

WING SURFACE FROM NACA PROFILE

Reads the contents of the NACA dat file sc20610.dat to create a wing surface.

See script header for more information.

_images/WingSurface.png

wing_surface_from_naca_profile.py