SimplifiedLogic / creoson

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

regen_failure_handling is not reset #93

Open broooooot opened 1 year ago

broooooot commented 1 year ago

Hi there,

we have the problem here that the parameter regen_failure_handling is set to resolve_mode, apparently by creoson. When I googled it I stumbled upon the source code of JlinkUtils.java where this config option is mentioned. Unfortunately, we can not work with this option enabled and sometimes it does not set itself back to no_resolve_mode.

I can not say when this happens exactly and unfortunately, I don't really have time to do that here at work, but maybe, you find the error pretty fast.

Thank you very much! If I can help in any way I will of course try.

adama2000 commented 1 year ago

The following creoson functions update the regen_failure_handling option:

I suppose one answer might be that after running all other creoson functions, your code makes a creoson call to "creo.set_config" to set that option deliberately. You MIGHT get a "deprecated option" error when you do that if previous creoson calls haven't set that option, because creoson disables that error when it sets the option internally.

Do you get any errors from creoson?

I'll look into it further...

Adam Andrews

On Wed, Mar 29, 2023 at 10:06 AM broooooot @.***> wrote:

Hi there,

we have the problem here that the parameter regen_failure_handling is set to resolve_mode, apparently by creoson. When I googled it I stumbled upon the source code of JlinkUtils.java where this config option is mentioned. Unfortunately, we can not work with this option enabled and sometimes it does not set itself back to no_resolve_mode.

I can not say when this happens exactly and unfortunately, I don't really have time to do that here at work, but maybe, you find the error pretty fast.

Thank you very much! If I can help in any way I will of course try.

— Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/93, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPGDY37FON7SWEP37L3W6Q6VTANCNFSM6AAAAAAWMA532A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

broooooot commented 1 year ago

Hi Adam,

thank you for your response! Strangely though I'm not using any of these functions in the code but only the following:

creo_set_creo_version()
creo_pwd()
file_get_active()
creo_cd()
creo_list_files()
file_open()
interface_mapkey()
interface_export_image()
interface_export_pdf()
interface_export_file()
parameter_exists()
drawing_select_sheet()
drawing_create()
view.list_()
view.activate()
drawing_get_cur_model()
drawing_get_num_sheets()
file_close_window()
parameter.list_()

As a workaround I already tried setting the config option via creoson but I'm getting a runtime error saying Please check your config option value: no_resolve_mode so I'm guessing, because it's deprecated, you can not set it via creoson. But, as a quick fix, I set the parameter in the config.sup file so it can (presumably) not be overwritten and since then we haven't had any occurence of the parameter being set back to resolve_mode and the scripts run fine anyways.

I hope that helps, thank you!

Zepmanbc commented 1 year ago

Hi, I do something like this when I instanciate the client at the begining of my script self.client.creo_set_config("regen_failure_handling", "no_resolve_mode") it's ok with Creo 8, did not tried with Creo 9

jordifas commented 1 year ago

I have the same issue. Where can I find the config.sup file?

eng-marani commented 9 months ago

Unfortunately, your product will likely no more work for Creo10 upward. Ptc has simply removed the regen_failure_handling option alltogether. JLink/VB API now will have all functions that relies on the resolve mode, no longer working, but throwing an exception XToolkitBadContext instead.

Apparently, there is nothing we can do to restore functionality in Creo10. If you can find any workaround please let me know. So sorry about this.

davidhbigelow commented 9 months ago

Creo 10 support is coming! We have been busy making sure other products were supported first.

eng-marani commented 9 months ago

How did you overcome the recent limitation of all .ExecuteFeatureOps() that return XToolkitBadContext when performing various feature operations in Creo10, like .CreateDeleteOp() for removing a component ? I had to resort to a mapkey (selection+ProCmdEditDelete) to workaround this.

adama2000 commented 8 months ago

New creoson release was posted this weekend. If you set_creo_version with 9 or 10, it will now use an embedded native DLL to do certain feature operations, and will no longer try to do the JLink FeatureOps calls you mentioned.

Adam

On Mon, Nov 27, 2023, 04:27 MaRaNtZ @.***> wrote:

How did you overcome the recent limitation of all .ExecuteFeatureOps() that return XToolkitBadContext when performing various feature operations in Creo10, like .CreateDeleteOp() for removing a component ? I had to resort to a mapkey (selection+ProCmdEditDelete) to workaround this.

— Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/93#issuecomment-1827455827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPKPAMDSANBAUETRWHYGDYGRMJTAVCNFSM6AAAAAAWMA532CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXGQ2TKOBSG4 . You are receiving this because you commented.Message ID: @.***>