1
General Board / GetCurrentDiagram() returns null
« on: March 02, 2022, 04:03:39 am »
Hi to whoever reading this 
I have a following code:
I cannot get the "GetCurrentDiagram()" function returning anything. It always returns null (the if statement above in the code is skipped).
Anyone knows why?
Additional info:
EA v13
Selected diagram in tree
clicked on the diagram in the viewport

I have a following code:
Code: [Select]
// Main
var rep as EA.Repository;
rep = Repository;
var diag as EA.Diagram;
diag = rep.GetCurrentDiagram();
if (diag != null){
Session.Output(diag.type);
}
I cannot get the "GetCurrentDiagram()" function returning anything. It always returns null (the if statement above in the code is skipped).
Anyone knows why?
Additional info:
EA v13
Selected diagram in tree
clicked on the diagram in the viewport