Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

This the Optionality of the Relationship. Valid values are: 0 = Optional and 1 = 0. Mandatory = 1. DATATYPE: Integer.

Property

...

Type

  • Read-write property

Syntax

...

Code Block
languagevb
Public Property OptionalityValue() As Variant

Example

Sub Main
Anchorwp1024442wp1024442 
Anchorwp1024443wp1024443  
Dim d As Diagram
Anchorwp1024444wp1024444Dim m As Model
Anchorwp1024445wp1024445
Dim rel As Relationship
anchor

wp1024446wp1024446 
Anchorwp1024447wp1024447Set d = DiagramManager.ActiveDiagram
anchor
wp1024448wp1024448Set m = d.ActiveModel
Anchorwp1024449wp1024449 
Anchorwp1024450wp1024450

'Force every Relationship to be Mandatory and One-To-One or More
anchorwp1024451wp1024451 
Anchor

wp1024452wp1024452For Each rel In m.Relationships
anchor
wp1024453wp1024453rel.OptionalityValue = 1
Anchorwp1024454wp1024454rel.CardinalityNo = 1
Anchorwp1024455wp1024455Next relanchor

End Subwp1024456wp1024456 
Anchorwp1024457wp1024457End Sub


Info
titleSee Also