openDiagramElement() method not work in some cases

Hi guys
As you may know, we can show an element in vp using this method :
ApplicationManager.instance().getDiagramManager().openDiagramElement()

This method takes an IDiagramElement as the argument and it works fine when I pass an IDiagramElement from the current opening project to it. But when I close the project or open another project and try to show the same element again (by calling the method again with the same IDiagramElement reference) it will fail. Actually, it will not perform any action!
Also I opened the project manually by calling ApplicationManager.instance().getProjectManager().openProject() before calling openDiagramElement() but it wont perform any action in this case too.

Does anybody know the reason?
Thanks in advance

Hi Mamad,

Thank you for your post. I am asking our engineers and will keep you posted on any updates about the questions you asked.

Best regards,
Jick Yeung

1 Like

Hi Mamad,

A patch build has just been released, which contains a fix for the second case you described. Now, by calling openProject(), you can then call openDiagramElement() to open it.

To obtain the fix, please update to the latest patch build (16_2_20210420as or newer). The article below shows you how to perform the update:

Hope this helps.

Best regards,
Jick Yeung

1 Like

Hi @Jick
Thank you so much for your support :clap: :clap::pray:

You are welcome :slight_smile: