diff --git a/HISTORY.rst b/HISTORY.rst index 46c4d4f..5bc088e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,18 @@ History ======= +0.7.4 (2022-05-16) +------------------ + +Update for `Creoson 2.8.1 release`_. + +* Add parameters: + * bom_get_paths : get_simpreps +* Documentation update: + * creo_set_creo_version : Creo 8 support. + +.. _`Creoson 2.8.1 release`: https://github.com/SimplifiedLogic/creoson/releases/tag/v2.8.1 + 0.7.3 (2021-08-29) ------------------ diff --git a/creopyson/__init__.py b/creopyson/__init__.py index a4de61a..37afb86 100644 --- a/creopyson/__init__.py +++ b/creopyson/__init__.py @@ -4,7 +4,7 @@ __author__ = """Benjamin C.""" __email__ = "zepman@gmail.com" -__version__ = "0.7.3" +__version__ = "0.7.4" from creopyson.connection import Client from creopyson.objects import jlpoint diff --git a/creopyson/bom.py b/creopyson/bom.py index c84660c..611209b 100644 --- a/creopyson/bom.py +++ b/creopyson/bom.py @@ -9,6 +9,7 @@ def get_paths( top_level=None, get_transforms=None, exclude_inactive=None, + get_simpreps=None, ): """Get a hierarchy of components within an assembly. @@ -35,6 +36,9 @@ def get_paths( exclude_inactive (boolean, optional): Whether to exclude components which do not have an ACTIVE status. (default" : False) + get_simpreps (boolean, optionnal): + Whether to return the Simplified Rep data for each component. + (default" : False) Returns: Dict: @@ -69,4 +73,6 @@ def get_paths( data["get_transforms"] = get_transforms if exclude_inactive is not None: data["exclude_inactive"] = exclude_inactive + if get_simpreps is not None: + data["get_simpreps"] = get_simpreps return client._creoson_post("bom", "get_paths", data) diff --git a/creopyson/creo.py b/creopyson/creo.py index 96b8144..675eee7 100755 --- a/creopyson/creo.py +++ b/creopyson/creo.py @@ -208,9 +208,10 @@ def set_creo_version(client, version): This function only needs to be called once per creoson session. This function must be called if you are doing certain functions - in Creo 7 due to deprecated config options. + in Creo 7 or later due to deprecated config options. + At this time this function only supports 7 and 8. - Needed for functions: + This is needed for functions: familytable_replace file_assemble file_regenerate diff --git a/setup.cfg b/setup.cfg index e9796ea..25b1259 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.7.3 +current_version = 0.7.4 commit = True tag = False diff --git a/setup.py b/setup.py index 020314c..94f8ae4 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,6 @@ test_suite="tests", tests_require=test_requirements, url="https://github.com/Zepmanbc/creopyson", - version="0.7.3", + version="0.7.4", zip_safe=False, ) diff --git a/tests/test_bom.py b/tests/test_bom.py index b3de236..d7769a7 100644 --- a/tests/test_bom.py +++ b/tests/test_bom.py @@ -12,7 +12,8 @@ def test_bom_get_paths_ok(mk_creoson_post_dict, mk_getactivefile): skeletons=True, top_level=True, get_transforms=True, - exclude_inactive=True + exclude_inactive=True, + get_simpreps=True, ) assert isinstance(result, (dict)) c = creopyson.Client()