By Aaron Lu
View inserted into Sheet will become Viewport, when we select the view port, snoop it with RevitLookup, we can see:
So how to get its location? After looking at RevitAPI.chm, we can find there are 3 relevant methods:
//Returns the center of the outline of the viewport on the sheet,
// excluding the viewport label. XYZ GetBoxCenter(); //Returns the outline of the viewport on the sheet,
// excluding the viewport label. Outline GetBoxOutline(); //Gets the outline viewport's label on the sheet. Outline GetLabelOutline();
Let's see the meaning of those methods directly with below image: