SimplifiedLogic / creoson

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

Drawing function create_gen_view() requires "scale" parameter #55

Closed gazontimide closed 3 years ago

gazontimide commented 3 years ago

Hi, I am using the python library to control CreoSon.

When using the function create_gen_view(), the documentation states that the "scale" parameter is not required but it will return an error if used without it. If I use the parameter, the function works as intended and the view uses its own scale. I looked at the python's method and it looks fine with the parameter set to scale=None by default.

code : view_display_data = {'style': 'no_hidden', 'tangent_style': 'none'} creopyson.drawing.create_gen_view(clientobj, view='FLAT_VIEW', model_view='TOP', point={'x': 140, 'y': 108}, display_data=view_display_data)

error : raise RuntimeError(error_msg) RuntimeError: No 'scale' parameter given

Thanks,

Sam

adama2000 commented 3 years ago

You're right, that's a bug in the creoson code. The scale parameter should be optional. We'll fix this in the next version.

Thanks for telling us! Adam

On Fri, Nov 27, 2020 at 5:25 PM gazontimide notifications@github.com wrote:

Hi, I am using the python library to control CreoSon.

When using the function create_gen_view(), the documentation states that the "scale" parameter is not required but it will return an error if used without it. If I use the parameter, the function works as intended and the view uses its own scale. I looked at the python's method and it looks fine with the parameter set to scale=None by default.

code : view_display_data = {'style': 'no_hidden', 'tangent_style': 'none'} creopyson.drawing.create_gen_view(clientobj, view='FLAT_VIEW', model_view='TOP', point={'x': 140, 'y': 108}, display_data=view_display_data)

error : raise RuntimeError(error_msg) RuntimeError: No 'scale' parameter given

Thanks,

Sam

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/55, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPFEYVBFFR2FLDTEQE3SSARNTANCNFSM4UFLJ6XA .

adama2000 commented 3 years ago

Checked in a fix, it'll be in the next release.