Return newly added |_Relationship| instance of `reltype`. The new relationship relates the `target` part to this part with key `rId`. Target mode is set to ``RTM.EXTERNAL`` if `is_external` is |True|. Intended for use during load from a serialized package, where the rId is
(self, reltype: str, target: Part | str, rId: str, is_external: bool = False)
| 86 | return cls(partname, content_type, blob, package) |
| 87 | |
| 88 | def load_rel(self, reltype: str, target: Part | str, rId: str, is_external: bool = False): |
| 89 | """Return newly added |_Relationship| instance of `reltype`. |
| 90 | |
| 91 | The new relationship relates the `target` part to this part with key `rId`. |
| 92 | |
| 93 | Target mode is set to ``RTM.EXTERNAL`` if `is_external` is |True|. Intended for |
| 94 | use during load from a serialized package, where the rId is well-known. Other |
| 95 | methods exist for adding a new relationship to a part when manipulating a part. |
| 96 | """ |
| 97 | return self.rels.add_relationship(reltype, target, rId, is_external) |
| 98 | |
| 99 | @property |
| 100 | def package(self): |