Zepmanbc / creopyson

Python library for Creoson (http://www.creoson.com)
MIT License
60 stars 5 forks source link

freeze "file_display" #59

Closed yuyaU0507 closed 2 years ago

yuyaU0507 commented 2 years ago

Hi there, I tried to activate a single part in an assembly using the "file_display" command as below and then python froze. I would like to know two points: 1) Is it possible to activate a part in an assembly with the command? 2) Is the command correct?

Thank you.

---- commands ----

import creopyson c=creopyson.Client() c.connect()

c.filedisplay(file="TEST_PART.PRT")

Zepmanbc commented 2 years ago

Hi Maybe I'm wrong, I never used this function, but I think your part must be in memory before you display it. So you must use file_open before file_display. With file_open you can display directly, that's why I never used file_display

yuyaU0507 commented 2 years ago

Hi Thank you for sharing the mothod!

With the command, only the selected part is displayed. I would like to activate a part with the assembly desplayed. Is it possible to do that with creopyson?

Zepmanbc commented 2 years ago

There is no function for this but you can do a mapkey to search the part throw its name or ID and then activate it to run the mapkey : https://creopyson.readthedocs.io/en/latest/creopyson.html#creopyson.connection.Client.interface_mapkey

yuyaU0507 commented 2 years ago

Okay, thank you for your help!