I mean for it to stay outside its Pokeball?
Well, while I cannot give you the maximum Height for a Pokemon to enter a building, I can give you the Tallest Pokemon that can enter a building which is:
Gyarados is approximately 21'04'' in height, which is 6.5 M in those of you in the Metric System. Anything shorter than Gyarados can fit in a building no problem, except for certain Legendary Pokemon for some odd reason. Here is is the Link that that shows the Heights of each Pokemon:
Tested on Pokemon HG