Return rId key of new or existing relationship to `part`. If a relationship of `reltype` to `part` already exists, its rId is returned. Otherwise a new relationship is created and that rId is returned.
(self, part: Part, reltype: str)
| 142 | return list(self.iter_parts()) |
| 143 | |
| 144 | def relate_to(self, part: Part, reltype: str): |
| 145 | """Return rId key of new or existing relationship to `part`. |
| 146 | |
| 147 | If a relationship of `reltype` to `part` already exists, its rId is returned. Otherwise a |
| 148 | new relationship is created and that rId is returned. |
| 149 | """ |
| 150 | rel = self.rels.get_or_add(reltype, part) |
| 151 | return rel.rId |
| 152 | |
| 153 | @lazyproperty |
| 154 | def rels(self): |