legend logic to find empty cells in Satisfied By column

Discussions about systems engineering product SysML functionalities

Moderator: Moderators

legend logic to find empty cells in Satisfied By column

Postby justin.berrier@navy.mil » Mon Apr 29, 2019 10:28 am

I'm trying to create logic for use with a legend item to find empty cells in the Satisfied By column of a sysml requirements table, but I'm having trouble doing so. Anyone have experience doing this?
justin.berrier@navy.mil
Forum Beginner
Forum Beginner
 
Posts: 31
Posts Rating:1
Joined: Tue Nov 28, 2017 3:05 pm

Re: legend logic to find empty cells in Satisfied By column

Postby mbseason » Tue Apr 05, 2022 1:28 pm

I see this is an old post, but a good question.

I had the same issue trying to create expressions to return true if certain properties were empty.

The best way I was able to address this issue was to create a Script under the Elements by Condition section on the Legend Item specification.

Create operation -> Script

Language:
OCL2.0

Body:
if self.propertyOfInterest->notEmpty() then
false
else
true
endif

I am no expert in OCL so there may be a better way to do this. However, this worked for me. Just make sure the Element Type of the table is the owner of this property (i.e., self) and replace propertyOfInterest with whatever property it is that you are checking to see if it is empty.

Hope this is helpful to someone out there!
mbseason
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Tue Apr 05, 2022 1:21 pm

Re: legend logic to find empty cells in Satisfied By column

Postby marc.arias@lmco.com » Mon Nov 28, 2022 11:36 am

Hello ,
How exactly would you do the following ? "Just make sure the Element Type of the table is the owner of this property (i.e., self) " What methods would you use for this ?
I am running into an issue where I create a property Instance and I am getting a Element has no Owner error
marc.arias@lmco.com
Forum Newbie
Forum Newbie
 
Posts: 7
Posts Rating:1
Joined: Mon Nov 28, 2022 9:16 am

Re: legend logic to find empty cells in Satisfied By column

Postby marc.arias@lmco.com » Tue Nov 29, 2022 12:46 pm

marc.arias@lmco.com wrote:Hello ,
How exactly would you do the following ? "Just make sure the Element Type of the table is the owner of this property (i.e., self) " What methods would you use for this ?
I am running into an issue where I create a property Instance and I am getting a Element has no Owner error


I answered my own question and posted a reply on this forum post :
add-parameter-to-activity-parameter-node-t7678.html
marc.arias@lmco.com
Forum Newbie
Forum Newbie
 
Posts: 7
Posts Rating:1
Joined: Mon Nov 28, 2022 9:16 am


Return to SysML

Who is online

Users browsing this forum: No registered users and 0 guests