Viewport Outline bug?

Hi people. Got a trouble here working with legend views and viewports. I access to my Viewports properties through the API properties around Viewport.Outline (Max and min Points). I manage to get the values from each viewport but I think that Im getting a bug here. I get the same values for all the Viewports but Im pretty sure that the size is different as I show. What am I missing here? Thanks =)


Addition: I also tried to access to the Viewport location and size through the BoundingBox property but this is giving me some other errors.

I added the GetDiagonalLenght() method so you can see clearly that Im getting the same values for all the Viewports.

It appears to be working fine for me. Did you duplicate the legends from one another?

Hi Sean. Thanks for your answer. Yes, the views are duplicates from another. Should this be a problem? I create the duplicates, then change the component (then the size change) and then try to catch the viewport size and get this error. Obviously I’m getting the size of the viewport previously to changing the legend component but I don’t understand why this lead to this error or how to fix it.

Are you regenerating the doc after the edits but before this node? If not, then the dimensions in this node are captured prior to the regeneation from the changes in content. Perhaps changing the doc.regenerate to happen before you get the size would help.

This was the solution. I didnt knew this method. Thanks so much =)