Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Need up to date instructions for SysML Parametric Modelling
Need up to date instructions for SysML Parametric Modelling [message #1770665] Tue, 15 August 2017 23:46 Go to next message
Brad Crochet is currently offline Brad CrochetFriend
Messages: 32
Registered: July 2017
Version: Neon (4.6.0)
Build id: 2017-01-10T18:00:02Z
SysML 1.4

Hello. I'm trying to follow the tutorial here:

for building constraint blocks/properties into a model, along with the associated PAR diagrams. What I'm seeing in Papyrus diverges from that shown in the video at around 0:40, when the author drops a ContraintProperty on the PAR diagram and uses the popup wizard to create a ConstraintBlock in the model to type the Property. His Property and C-Block have a null constraint already built in...mine do not. I go into the definition of my ConstraintBlock and add a constraint, but the new constraint isn't applied to the ConstraintProperty. Could anyone point me to other instructions on this matter...or maybe just set me straight on what I'm doing wrong?

Thanks a bunch!

EDIT: I am now attempting to create the ConstraintBlock entirely within the Model Explorer, per instructions here:

However, every time I try to create a constraint property under the ConstraintBlock, Papyrus complains about the specification, saying "constraint is invalid". I'm talking about a simple constraint spec like "a = b" {natural language}. I've done this kind of modelling in other software just fine. Any help at all is much appreciated...just a clue as what I'm doing wrong here.

[Updated on: Wed, 16 August 2017 21:21]

Report message to a moderator

Re: Need up to date instructions for SysML Parametric Modelling [message #1770853 is a reply to message #1770665] Thu, 17 August 2017 22:57 Go to previous message
Brad Crochet is currently offline Brad CrochetFriend
Messages: 32
Registered: July 2017
In case someone else has the same trouble I've had, I will post here the caveats I've discovered necessary when attempting to follow the older directions (linked in my original post) with the current version of Papyrus/SysML. Most of what's here refers to the youtube video (first of my links in the original post).

1) ConstraintParameter is no longer an option on the palette when building PAR diagrams. One should simply select Parameter (Nodes), and place that on the desired ConstraintProperty element on the diagram. This action will automatically add a ConstraintParameter to the defining ConstraintBlock.

2) ConstraintBlocks are created, by default, without any ConstraintProperty. One must manually create the ConstraintProperty by:
Model Explorer -> rightclick [ConstraintBlock] -> New Child -> Constraint

2a) MAJOR PITFALL: When one creates a new ConstraintProperty in this way, Papyrus will automatically have the user begin entering a formal ConstraintSpecification in OCL (I'm not entirely educated on this part). For me, this always resulted in errors (red icons in the Explorer) that I couldn't get rid of, even when I left the specification blank, and/or changed the language from OCL to Natural Language.
2b) SOLUTION TO 2a: After manually creating a ConstraintProperty, press ESC to get out of the default Specification entry routine. Then, select the newly created (but empty) contraintSpec in Explorer, and use the Value entry in the Properties window (note: no language option this time) and type your specification, i.e. v=dx/dt.

[NOTE: 2a and 2b should be updated by someone that knows OCL and Parametric modelling in Papyrus better than I do]

3) I could never drag ValueType definitions from Explorer onto the ConstraintParameters on the diagram. This had to be done manually in the Properties page of the Parameter. The problem may stem from Papyrus not correctly registering that the mouse pointer is positioned over the Parameter graphic, and not just the larger ConstraintProperty graphic. I say this because I also had trouble attaching Binding Connectors to Parameters.

4) Constraints DO NOT automatically show up in the ConstraintProperties elements on the PAR diagram. One must: a) rightclick [ConstraintProperty] on the diagram -> Filters -> Show/Hide Compartments -> select "constraints", AND b) drag the Constraint in question from its place under the associated ConstraintBlock in Explorer, onto the ConstraintProperty element on the diagram.

I've attached the project folder in which I successfully duplicated (partially) the model in the youtube video.
  • Attachment:
    (Size: 5.03KB, Downloaded 55 times)
Previous Topic:Papyrus Architecture Model - Oxygen (Creation Command Class issue)
Next Topic:Is it possible to put special characters (Greek) in element names?
Goto Forum:

Current Time: Fri Jul 10 13:58:31 GMT 2020

Powered by FUDForum. Page generated in 0.01950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top