Saving/Restoring user defined string filters

Hello,

I created a C# tool for automation of our Passolo related workflows. For the automated translation process we need some specific/different Passolo settings (options).

Therefore...

1) When the tool starts I save all current Passolo setting via COM instruction objPSL.Option[-number].

2) Then I change some settings that are required for the translation process.

3) Before the tool ends I restore the formerly saved settings to have Passolo in the same state as before.

Unfortunately, there seems to be no possibility to save/restore existing user defined string filters via COM instructions.

The only workaround I have found so far is to save the user defined string filters in a separate .pslopt file via the export options dialogue (but that is a manual process step I want to avoid) and then to import the filter settings via COM instruction objPSL.ImportOptions[file name] again.

I know there exists a BATCH instruction for saving all options (including user defined string filters), but I want to avoid calling batch instructions inside the C# code.

Apart from that the .pslopt file is not always properly saved using the batch command.

Is there any possibility to save/restore user defined string filters via COM command?

emoji
Parents
  • There is no COM object/method to save and restore string filters.

    After reading your request, I was wondering why you need such a function. Changing and restoring settings using COM for an automated process is one thing, but in such automated processes you don’t need filters. Filters are used defined data, stored in the user's directory. They can be used in the UI, but not in automated processes, and they will not change in your automation.

    emoji
  • You are right, I don't need the filters throughout the automated process.

    But the problem is, that all existing user defined filters get lost because I can't store them before I start automation and restore them after automation has finished. There exists only a COM command "objPSL.Import(file name)" for importing an .pslopt file but not a corresponding COM command for exporting/saving such a file.

    Therefore I had to use the COM command "objPSL.Option[-number]" to save each single Passolo setting in an array and restore them using the same COM command from the array. But unfortunately the filters are obviously not considered as settings/options (my code consideres all via COM reachable settings). So I need the partly manual workaround described in my first post (that's not a really serious problem, but a bit unconvenient for the localisation team and also error prone).

    I wonder why there exists only a batch command ("save") for exporting all Passolo settings (inclusive all filters) in an .pslopt file, but no corresponding COM command.

    (By the way, I wonder what are the criterias to get a high sentiment score, 4 stars for my first post, now only 2 ;)

    emoji
Reply
  • You are right, I don't need the filters throughout the automated process.

    But the problem is, that all existing user defined filters get lost because I can't store them before I start automation and restore them after automation has finished. There exists only a COM command "objPSL.Import(file name)" for importing an .pslopt file but not a corresponding COM command for exporting/saving such a file.

    Therefore I had to use the COM command "objPSL.Option[-number]" to save each single Passolo setting in an array and restore them using the same COM command from the array. But unfortunately the filters are obviously not considered as settings/options (my code consideres all via COM reachable settings). So I need the partly manual workaround described in my first post (that's not a really serious problem, but a bit unconvenient for the localisation team and also error prone).

    I wonder why there exists only a batch command ("save") for exporting all Passolo settings (inclusive all filters) in an .pslopt file, but no corresponding COM command.

    (By the way, I wonder what are the criterias to get a high sentiment score, 4 stars for my first post, now only 2 ;)

    emoji
Children