Package: pycatia
alpha softwareThis is alpha software.All the test cases and examples work but there will be many issues outside of
the test framework. The CATIA com interface is huge and I’ve predominantly
only worked / tested on those I can figure out how to use.The entire framework is now in place for others to contribute so if you know
CATIA and python (being already familiar with automation using the more
traditional methods will help) please do contribute. Bonus points for adding
tests too.I have limited access to CATIA licences / workbenches. Also, there’s are many
modules that I simply don’t know what they do. Thus my ability to test and
support can be limited.All this said many bugs that exist should be for the most part be quite easy to
fix using those methods that do work as a reference.Why was it made?pycatia was initially created to access the CATIA Automation Measurable object
and it’s methods without the need of visual basic / CATScripts.Some of the methods can be accessed directly using the pywin32 module but there
are a number that just simply won’t work using python. There are several
questions on stack overflow and the pywin32 mailing list regarding this. But,
they failed to provide any working examples with the Measurable object in python.pycatia accesses these methods by running VBA scripts using theDispatch(‘CATIA.Application’).SystemService.Evaluate()function and passing a
public function to it. Otherwise, pycatia uses the VB method directly but
exposes it within the same python class.There is now a lot more functionality available which can be seen by looking at
the examples provided and reading the API atpycatia.readthedocs.io.Requirementspython >= 3.9CATIA V5running on Windows.see requirements.txtInstallationseeinstallation.UsageSee theintroduction,examplesanduser_scriptsfor a good over view on how
to use pycatia.LinksReleases: pycatia @pypi.orgExamples And ScriptsSee the documentation @examplesanduser_scripts.Asking QuestionsPlease read the following with regards to raising questions:https://github.com/evereux/pycatia/issues/28ContributingSee CONTRIBUTING.md in root of github repository.Running The TestsPrior to running the tests please ensure CATIA V5 has the following
configuration settings:CGR cache system must be disabled.Do not activate default shapes on open must be disabled.Parameter names must not have back ticks enabled. Tools > Options > General > Parameters and Measure > Knowledge > Parameter Names > Surrounded by the ` symbol.On the first run, during the running of the tests, the test suite will create
the CATIA drawing, products and part it requires to run in the folder
tests/cat_files.CATIA V5 should already be running and have NO documents already open.To run the tests with coverage (-v is verbosity):py.test-v--cov-reportterm-missing--cov=pycatiaTo run a specific test:py.test-vtests/test_product.py::test_moveTo stop tests running after first failure.py.test -vxRelease processA reminder for @evereux. I don’t do this often and forget …Check version is correct.Check changelog has been updated.Run the tests.pytest -v testsEnsure cache is disabled andFix any issues.Run the examples.Fix any issues.Build the docs.cd docsmake htmlFix any issues.Run mypy over module.mypy pycatiaBuild source.python setup.py sdist bdist_wheelCheck source contents.Build pycatia exepython-mnuitka--standalonepycatia-exe.py.
* use 64 env.
* rename pycatia-exe.exe.
* copy build to win_32 folder and zip.Merge changes with master branch and upload.Upload to pypi.twine upload dist/*.Update github releases.