Skip to main content

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

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


Download files

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

Source Distribution

nxopentse-0.0.1a6.tar.gz (34.2 kB view hashes)

Uploaded Source

Built Distribution

nxopentse-0.0.1a6-py3-none-any.whl (35.7 kB view hashes)

Uploaded Python 3

Supported by

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