Skip to content

How to link created requirements with a logical system or with higher level requirements? #482

Answered by Wuestengecko
dwdbmeagle asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! You need to create relations on the new Requirement, like this:

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 InternalRelation and CapellaIncomingRelation, so the same call works for both cases.

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 = 

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Wuestengecko
Comment options

You must be logged in to vote
6 replies
@Chang-Fab
Comment options

@Wuestengecko
Comment options

@Chang-Fab
Comment options

@Wuestengecko
Comment options

@Chang-Fab
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants