Basic Sample Scripts

Short, beginner versions of the Advanced Sample Scripts. Each one does the main job of its full sample in a few dozen lines, so you can read the whole script and see how it works. They have no start window, no options, no completion window and no log. Results are printed to the Python.NET Console.

Note

New to scripting? Read Basic Introduction to Scripting first. It explains how to run a script and the few Python ideas these samples use.

When you are ready for more, each page links to its full sample, which adds a start window with options, error handling, a log and a completion window.

How to Use Them

  1. Open Filter.CATPart (or your own model) in SpinFire Insight. It is installed in the Samples\CATIA V5\Aquo Bottle folder of your SpinFire Insight installation. Each page says if a sample needs something else.

  2. Open View > Python.NET Console to see what the script prints.

  3. Click the Scripting icon on the 3D toolbar, choose New Script…, paste the script and click Run.

  4. To change what a script does, edit the values under # ---- Settings (change these) ---- at the top.

Files are saved under C:\temp\SpinFire_Basic_Samples, in a new folder for each run, so earlier results are never overwritten.

Warning

These are unofficial sample scripts, provided as-is without warranty or support. Save your work before running them. If a script stops with an error, check the console: it shows the message and the line that caused it.

Samples

Basic sample

Full version

Basic 01 — Open And Snapshot Views

Sample 01 — Open And Snapshot Views

Basic 02 — Appearance Presets

Sample 02 — Appearance Presets

Basic 03 — Branded Snapshots

Sample 03 — Branded Snapshots

Basic 04 — Assembly Tree Walker

Sample 04 — Assembly Tree Walker

Basic 05 — Isolate And Restore

Sample 05 — Isolate And Restore

Basic 06 — Part Report

Sample 06 — Part Report

Basic 07 — Point To Point Distance

Sample 07 — Point To Point Distance

Basic 08 — Surface Bounding Box Overlay

Sample 08 — Surface Bounding Box Overlay

Basic 09 — Show Vertex Normals

Sample 09 — Show Vertex Normals

Basic 10 — Edge Picker

Sample 10 — Edge Picker

Basic 11 — Markup Shapes

Sample 11 — Markup Shapes

Basic 12 — Coordinate System Workflow

Sample 12 — Coordinate System Workflow

Basic 13 — Section Box

Sample 13 — Section Box

Basic 14 — Section Cut Sweep

Sample 14 — Section Cut Sweep

Basic 15 — Section Sweep Animation

Sample 15 — Section Sweep Animation

Basic 16 — Transform And Mirror

Sample 16 — Transform And Mirror

Basic 17 — Explode Animation

Sample 17 — Explode Animation

Basic 18 — Batch Thumbnails

Sample 18 — Batch Thumbnails

Basic 19 — Explain the Assembly

Sample 19 — Explain the Assembly

Basic 20 — Export Points

Sample 20 — Export Points

Basic 21 — Highlight by Name

Sample 21 — Highlight by Name

Basic 22 — Open, Import and Save

Sample 22 — Open, Import and Save

Basic 23 — Move a Coordinate System

Sample 23 — Move a Coordinate System