Zepmanbc / creopyson

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

regen_failure_handling error #49

Closed Krasner closed 2 years ago

Krasner commented 2 years ago

Description

When regenerating a file with file_regenerate() I get the following warning: image

With a message: "Attempted use of depreciated config option regen_failure_handling is blocked"

This blocks further operation until i click OK and sometimes causes Creo to crash. What is causing this error and how can I avoid it?

Zepmanbc commented 2 years ago

Hello you must say to Creoson that you are using Creo 8 : https://creopyson.readthedocs.io/en/latest/usage.html#creo-7-users c.creo_set_creo_version(8) for you

Krasner commented 2 years ago

I already do that... Does it matter when this is set? Here are my initialization steps:

self.c= creopyson.Client(ip_adress=host, port=9056)
if self.c.is_creo_running()==False:
    print("creo is not running, starting Creo...")
    self.c.start_creo(os.path.join(app_dir, "nitro_proe_remote.bat"))
    # allow enough time for creo to start
    time.sleep(10)
else:
    print("creo is already running")

self.c.connect()
self.c.creo_set_creo_version(8)
self.c.creo_cd(cad_dir)
adama2000 commented 2 years ago

You should be able to set creo version at any time before you do your first regenerate.

Are you sure you're running the NEWEST version of creopyson/creoson, the one that was just released this/last week? If you're still running the old version, that would explain this error.

Adam Andrews

On Thu, May 19, 2022 at 7:31 AM Krasner @.***> wrote:

I already do that... Does it matter when this is set? Here are my initialization steps:

self.c= creopyson.Client(ip_adress=host, port=9056) if self.c.is_creo_running()==False: print("creo is not running, starting Creo...") self.c.start_creo(os.path.join(app_dir, "nitro_proe_remote.bat"))

allow enough time for creo to start

time.sleep(10)

else: print("creo is already running")

self.c.connect() self.c.creo_set_creo_version(8) self.c.creo_cd(cad_dir)

— Reply to this email directly, view it on GitHub https://github.com/Zepmanbc/creopyson/issues/49#issuecomment-1131573746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPALXYRZ7OEC354CUZLVKYRBJANCNFSM5WJQBYHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Krasner commented 2 years ago

updating to creoson 2.8.1 and creopyson 0.7.4 has fixed this error.

When importing components to an assembly using file_assemble() I still have to manually click a confirmation in creo - file_assemble will block until i've clicked the green checkbox under Component Placement:

image

Is it possible to avoid that? I can't seem to find a creo configuration setting that would skip this step.

adama2000 commented 2 years ago

When you call file_assemble(), there is a "package_assembly" option on the creoson function. If you set that to True then I think it will NOT prompt you in Creo.

The "package_assembly" option is used whenever you call the file_assemble() function without specifying any assembly constraints. If "package_assembly" is False then it calls the JLink function "redefineThroughUI()" which I believe is what causes Creo to prompt you. And False is the default value for "package_assembly" if you don't specify a value.

Adam Andrews

On Thu, May 19, 2022 at 1:56 PM Krasner @.***> wrote:

updating to creoson 2.8.1 and creopyson 0.7.4 has fixed this error.

When importing components to an assembly using file_assemble() I still have to manually click a confirmation in creo - file_assemble will block until i've clicked the green checkbox under Component Placement:

[image: image] https://user-images.githubusercontent.com/7035109/169366003-71e28766-a7cb-4a10-8df1-9d2f9d794a0a.png

Is it possible to avoid that? I can't seem to find a creo configuration setting that would skip this step.

— Reply to this email directly, view it on GitHub https://github.com/Zepmanbc/creopyson/issues/49#issuecomment-1132016566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPFEC3J4A3PACAKPXDTVKZ6FTANCNFSM5WJQBYHQ . You are receiving this because you commented.Message ID: @.***>

Krasner commented 2 years ago

Awesome! That works!