The macrocyclic compounds consisting of photosensitive units as parts of the frame have been extensively studied to mimic photoregulated functions in nature. In this paper, controlled assembly of well-ordered arrays of photosensitive macrocyclic rectangles is demonstrated by using a host-guest molecular template. 4NN-Macrocycle molecules are observed to photoisomerize from trans-trans-trans-trans (t,t,t,t) to a range of isomers including trans-trans-trans-cis (t,t,t,c) and trans-cis-trans-cis (t,c,t,c) isomers after irradiation of UV light. The photoisomers are also observed to affect the guest-host network characteristic appreciably. In the STM observations we can distinguish three (t,t,t,t) conformational isomers, three (t,t,t,c) conformational isomers, and one (t,c,t,c) isomer, which self-assemble into different adlayers with TCDB on a HOPG surface. This study provides a facile approach to study the photoisomerization processes of the azobenzene groups and the conformational photoisomers.