How to link created requirements with a logical system or with higher level requirements? #482
-
|
I am using capella 7 with the requirement viewpoint addon. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
I'm also looking for a solution on this question. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! You need to create new_requirement = model.sa.requirement_modules[1].requirements.create(name=new_req_name,text=new_req_text)
related_element = model.by_uuid("...")
new_relation = new_requirement.relations.create(target=related_element)Depending on the type of the target (i.e. whether it's a Requirement or another model element), this call will automatically pick between You can also assign relation types, either after creating the relation ... req_type = model.search("RequirementType", below=model.sa).by_name("Functional Requirement")
new_relation.type = req_type... or directly during the new_relation = new_requirement.relations.create(target=related_element, type=req_type)Let me know if this helps, or if something doesn't work as it should! |
Beta Was this translation helpful? Give feedback.
-
|
@Wuestengecko Thanks for your response! |
Beta Was this translation helpful? Give feedback.




Hi! You need to create
relationson the new Requirement, like this:Depending on the type of the target (i.e. whether it's a Requirement or another model element), this call will automatically pick between
InternalRelationandCapellaIncomingRelation, so the same call works for both cases.You can also assign relation types, either after creating the relation ...