How to check if .SynchronizeExports has been successful

Hello,

currently, I'm writing a macro which should run (prj).SynchronizeExports and log a message, if the process has been finished successfully.

Unfortunately, this is not working as I would expect according to the documentation (docs.rws.com/.../pslproject-synchronizeexports. In the documentation, the following is mentioned: "Returns TRUE, if successful."

There is the following note, too: "Note: When reading update files during synchronization, it's possible that the project is closed and re-opened again. This causes that the PslProject object is not valid anymore. Use the return value of SynchronizeExports to re-assign the project pointer."
And the example:

"Dim prj As PslProject
Set prj = PSL.ActiveProject
If prj Is Nothing Then Exit Sub
// Synchronize exports and re-asign object
Set prj = prj.SynchronizeExports"

I've tried, "if prj.SynchronizeExports = True" as well as "Set prj = prj.SynchronizeExports" followed by "if prj is nothing then..." But both versions lead to a stop of the macro with either the message "Object variable is 'Nothing'", even if prj is not nothing at that time or "no such property or method".

Please be so kind, to let me know, how to check if a synchronization has been successful.
Thank you very much in advance for your support.

Kind regards and have a nice day.
Nils

emoji
Parents Reply Children
No Data