Return part to which this part has a relationship of `reltype`. Raises |KeyError| if no such relationship is found and |ValueError| if more than one such relationship is found. Provides ability to resolve implicitly related part, such as Slide -> SlideLayout.
(self, reltype: str)
| 115 | self._partname = partname |
| 116 | |
| 117 | def part_related_by(self, reltype: str) -> Part: |
| 118 | """Return part to which this part has a relationship of `reltype`. |
| 119 | |
| 120 | Raises |KeyError| if no such relationship is found and |ValueError| if more than |
| 121 | one such relationship is found. Provides ability to resolve implicitly related |
| 122 | part, such as Slide -> SlideLayout. |
| 123 | """ |
| 124 | return self.rels.part_with_reltype(reltype) |
| 125 | |
| 126 | def relate_to(self, target: Part | str, reltype: str, is_external: bool = False) -> str: |
| 127 | """Return rId key of relationship of `reltype` to `target`. |