Skip to content

Navigation Menu

Sign in
Sign up

Publish Hybrid Shapes In Geometric Set

KaiUR edited this page May 21, 2026 · 4 revisions

Publish Hybrid Shapes In Geometric Set

File: Part_Document_Scripts/Publish_Hybrid_Shapes_In_Geometric_Set.py
Version: 1.1
Document Type: Part


Description

Publishes every hybrid shape inside a selected geometric set using the shape name as the publication name. Shapes that are already published are skipped automatically. Useful for exposing geometry for use in product context or skeleton models.

The reference path is built automatically from the part name and the full geometric set path, supporting both top-level and nested geometric sets.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Not required
Open document Part

Usage

  1. Open a CATPart document containing a geometric set with hybrid shapes
  2. Run the script
  3. Select the geometric set to publish — click OK when done
  4. All shapes in the set are published under their own names

Output

Publications are added to the part under the shape's own name. A summary is printed to the console:

 Publishing 3 shape(s) from 'Skeleton'
 Published: PT_Origin
 Skipped (already published): PT_Ref
 Published: Curve_Spine
 Completed - 2 shape(s) published, 1 skipped

Notes

  • Publication names are taken directly from the shape name — if two shapes share a name only the first will be published and the second will error
  • Shapes that already have a publication with the same name are silently skipped
  • Works correctly with nested geometric sets — the full path is resolved automatically
  • If a publication fails, the error is printed to the console and the script continues to the next shape
  • If part.name includes the .CATPart extension and publications fail with a reference error, strip the extension from the part_name line in the script

Home


Getting Started


Contributing


Any Document Scripts


Drawing Document Scripts


Part Document Scripts


Shape Generation Scripts


Process Document Scripts


Product Document Scripts


Utility Scripts


Legal

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /