Skip to main content

A python module to access the CATIA Measurable object.

Project description

pycatia was primarily created to access the CATIA API Measurable object and it’s methods without the need of visual basic / CATScripts. There is further functionaliy available which can be seen by looking at the examples provided and reading the API at pycatia.readthedocs.io.

Some of the methods can be accessed simply using the pywin32 module but further access to methods such as GetCOG do not seem to be accessible using pure python. There are several questions on stack overflow and the pywin32 mailing list regarding this. But, they fail to provide any working examples with the VB Measurable object in python.

pycatia accesses these methods by running VBA scripts using the Dispatch(‘CATIA.Application’).SystemService.Evaluate() function where required and passing a small public function to it. Otherwise, pycatia uses the VB method directly but exposes it within the same python class.

This has currently only been tested in CATIA V5 R21.

Requirements

  • python >= 3.6

  • CATIA V5

  • see requirements.txt

Installation

with pip

pip install pycatia

For more detailed instructions please refer to the installation instructions available at pycatia.readthedocs.io.

Usage

See the examples provided.

Examples

Asking Questions

Please don’t raise an issue here until you have read the documentation, understood and met the requirements (YOU NEED CATIA INSTALLED) and have run the examples.

If you are upgrading from an earlier versions and your scripts break please check the changelog to give you clues on what to do to resolve those issues.

Once you have done that please give as much information as you can so I may try and reproduce the issue. Please provide the following information:

  • Windows OS version

  • CATIA version

  • Python version

  • pycatia version

  • Your code!

  • Full stack trace of error you encounter (properly formatted text please, not picture).

Thanks! :-)

Running The Tests

To run the tests with coverage:

py.test -v --cov-report term-missing --cov=pycatia

To run a specific test:

py.test -v tests/test_product.py::test_move

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycatia-0.2.0.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycatia-0.2.0-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file pycatia-0.2.0.tar.gz.

File metadata

  • Download URL: pycatia-0.2.0.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for pycatia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2e63d2e2cfb92f889fa757c56f8d2bf22f582d33d92ea235e9a33f09e51aaad
MD5 309f388606fdf2b91db389eec4b73750
BLAKE2b-256 5ced25a4b6fc8a63f6e5c60b6b9bc3f35daea5c936d59c68f5f6cccd72b3eb82

See more details on using hashes here.

File details

Details for the file pycatia-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pycatia-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for pycatia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67167ed7febbe9b706d5ea1bcb382dd0989003f3034a3def15752f3282c94680
MD5 04eb69ad3395a109b0ffc2c75ab4424f
BLAKE2b-256 a9804570aa35a70b3a7e0bb13b9904fcf36d5851a60785a4f691b3799ca48712

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page