SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
79 stars 23 forks source link

creopyson.feature.list_ does not list features #78

Closed stekicar closed 2 years ago

stekicar commented 2 years ago

I have the following code: `import creopyson from connect_to_creoson_server import connect_to_creoson

conn, c_srv, working_directory, active_file = connect_to_creoson()

if conn: lista = creopyson.feature.list_(csrv, file=None, name=None, status=None, type_=None, paths=None, no_datum=True, inc_unnamed=None, no_comp=None) print("") print(lista) lista_1 = creopyson.feature.list_params(csrv, file=None, name=None, type_=None, no_datum=True, inc_unnamed=None, no_comp=None, param=None, value=None, encoded=None) print("") print(lista_1)`

Result is like this: [{'status': 'ACTIVE', 'name': 'MASS_PROP_MAIN', 'type': 'ANALYSIS', 'feat_id': 232}]

[{'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'VOLUME', 'type': 'DOUBLE', 'value': 1978138.021920854, 'encoded': False}, {'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'SURF_AREA', 'type': 'DOUBLE', 'value': 127691.69893617852, 'encoded': False}, {'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'MASS', 'type': 'DOUBLE', 'value': 15.56794623251712, 'encoded': False}, {'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'XCOG', 'type': 'DOUBLE', 'value': 0.39767609722084035, 'encoded': False}, {'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'YCOG', 'type': 'DOUBLE', 'value': 0.493114032625629, 'encoded': False}, {'owner_name': 'MASS_PROP_MAIN', 'owner_type': 'ANALYSIS', 'designate': False, 'owner_id': 232, 'name': 'ZCOG', 'type': 'DOUBLE', 'value': 24.96303083740207, 'encoded': False}]

Thee are no holes listed or any extrusions and they are present in the model.

Is this result as it should be?

adama2000 commented 2 years ago

Sorry for the late reply.

My first guess is that those features are unnamed in your model. You have "inc_unnamed=None" in your input, and inc_unnamed defaults to false if not specified. Try "inc_unnamed=True".

stekicar commented 2 years ago

That was it! Thank you.