Skip to content

Navigation Menu

Sign in
Sign up

Toggle Show Hide Geometric Set

KaiUR edited this page Jul 20, 2026 · 5 revisions

Toggle Show Hide Geometric Set

File: Any_Document_Scripts/Toggle_Show_Hide_Geometric_Set.py
Version: 1.3
Document Type: Part, Product, or Process


Description

Toggles the visibility of the contents and children inside a selected geometric set. The selected set itself is not affected. Each element is toggled based on its own current visibility state — if it is shown it will be hidden, and if it is hidden it will be shown.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.10.0
wxPython Not required
Open document Part, Product, or Process

Usage

  1. Open a CATPart, CATProduct, or CATProcess document containing a geometric set
  2. Run the script
  3. Select the geometric set whose contents should be toggled — click OK when done
  4. All elements and child sets inside the selected set are toggled between shown and hidden — the selected set itself is unchanged

Notes

  • The selected set itself is not affected — only the items inside it are toggled
  • Each element is toggled based on its own current visibility state, not the parent's — so elements that were already hidden before running the script will be shown, and vice versa
  • The toggle applies recursively to all child geometric sets and their contents
  • To hide or show all planes and axis systems across the whole document use Hide Planes And Axis Systems instead
  • Requires pycatia >= 0.10.0. VisPropertySet.get_show() returns a tuple of (status, show) instead of a bare integer. Versions 1.2 and earlier of this script compared that result directly to an integer, which silently stopped matching — the script would reveal hidden elements but never hide visible ones. Version 1.3 reads the show state from index 1 and compares it against CatVisPropertyShow. See Writing Scripts for the full tuple-getter reference

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 によって変換されたページ (->オリジナル) /