An NXOpen helper package to reuse code in scripts, in order to avoid having all the underlying code in the journals itself.
Project description
nxopentse (by theScriptingEngineer)
This package contains functions which you can use in your own scripts, so you don't have to write everything from scratch.
pip install nxopentse
Then in your script add
import nxopentse
Simple example:
import NXOpen
import nxopentse as tse
# next line not required for nxopen, but every NXOpen journal needs an NXOpen.Session object
the_session: NXOpen.Session = NXOpen.Session.GetSession()
def main():
tse.tools.hello()
if __name__ == '__main__':
main()
nxopen.cad
CAD functionality
nxopan.cae
CAE functionality
nxopen.tools
General tools which can be used in different NX applications.
NX versions
SC2212:
development
There is a build pipeline in Github which automatically publishes to test.pypi and pypi (the latter only on tagged commits) So there is no need to manually build an upload to either test.pypi or pypi
tagging
git tag -a v0.0.1a1 -m "pre-release - can be used. Partially tested. Will still contain lots of bugs"
NOTE: Tags don't get pushed automatically. Use
git push origin --tags
or configure "git.followTagsWhenSync": true preferences -> extensions -> git -> check Follow tags when sync
workflow (VSCode):
- increase the version number so that it doesn't clash with test.pypi or pypi
- local commit
- tag the commit, with the same version number as above
- push/sync wioth github
build the package manually (for reference only)
install locally by navigating to folder and then
pip install .
uninstall:
pip uninstall nxopentse
update: uninstall and reinstall
required installations:
python -m pip install --upgrade twine
pip install build
Building the package:
python -m build
manually publish to test.pypi:
py -m twine upload --repository testpypi dist/*
manually publish to pypi: This has to be done manual on the first time, as 'non user identities cannot create new projects'
py -m twine upload dist/*
tag
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nxopentse-0.0.1a7.tar.gz
.
File metadata
- Download URL: nxopentse-0.0.1a7.tar.gz
- Upload date:
- Size: 34.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4782f69e588893490b7f16a9f3c5b6b7677280c7fed5d9818efa44d2e1a9bb7 |
|
MD5 | f6408966d8bd19b7e1c9a68392bb077a |
|
BLAKE2b-256 | 818956425640950ee185c5d84851b029f1441600a98b582d6e003e596a2e2829 |
File details
Details for the file nxopentse-0.0.1a7-py3-none-any.whl
.
File metadata
- Download URL: nxopentse-0.0.1a7-py3-none-any.whl
- Upload date:
- Size: 35.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3d5c7526b8f6548a68d1dbd4287e460553d5c37dba798ee3206ffa35a0214ce |
|
MD5 | b7802b9319d8f641c2ffe0937709878a |
|
BLAKE2b-256 | d67c8a4d6b7d5d2ff20733022fcc153fed95420cfec86af85965d7a152c03463 |