This paper deals with a method of path planning for indoor robots in buildings which is based on the building-related knowledge. Knowledge extracted from the IFC data model is used to construct a hypergraph model of the building layout. Information needed for route planning, e.g., room dimensions, directionality and types of doors, is stored in attributes attached to the hypergraph. As the declarative knowledge is represented by a graph-based structure, an artificial intelligence method in the form of a heuristic search of this structure is applied. A modified shortest-path search algorithm used to calculate the optimal route with regard to costs incurred by the robot during passing through different spaces and opening doors is proposed.