We have synthesized a series of 1D double-zigzag ({[Cd(paps)(2)(H(2)O)(2)](ClO(4))(2)}(n) (1), {[Cd(papo)(2)(H(2)O)(2)](ClO(4))(2)}(n) (3), and {[Cd(papc)(2)(H(2)O)(2)](ClO(4))(2)}(n) (5)) and 2D polyrotaxane frameworks ([Cd(papc)(2)(ClO(4))(2)](n) (6)) by the reaction of Cd(ClO(4))(2) with dipyridylamide ligands N,N'-bis(pyridylcarbonyl)-4,4'-diaminodiphenyl thioether (paps), N,N'-bis(pyridylcarbonyl)-4,4'-diaminodiphenyl ether (papo), and N,N'-(methylenedi-p-phenylene)bispyridine-4-carboxamide (papc), respectively, where their molecular structures have been determined by X-ray diffraction studies. Based on the powder X-ray data (PXRD) of compound 3 and its Zn(II) analogue, heating the double-zigzag framework of compound 3 can give the polyrotaxane framework of [Cd(papo)(2)(ClO(4))(2)](n) (4) and grinding this powder sample in the presence of moisture resulted in its complete conversion back into the pure double-zigzag framework. In addition, heating the double-zigzag frameworks of compounds 1 and 5 can induce structural transformation into their respective polyrotaxanes, whereas grinding these solid samples in the presence of moisture did not lead to the formation of the double zigzags. Herein, we investigated the effect of the metal (from Zn(II) to Cd(II)) on the assembly process and luminescence properties, as well as on the particularly intriguing structural transformation of a series of papx-based frameworks. In fact, the assembly behavior and luminescence properties of the Cd(II)-papx and Zn(II)-papx frameworks were really similar. However, both Zn(II)-papx (x = s, o) frameworks can perform reversible structural transformation, but only the Cd(II)-papo framework can do it. Therefore, a delicate metal effect on such a new structural transformation can be observed.