Description
Child Cardinality Number of the relationship: 0 = Zero or One to Zero or More, 1 = Zero or One to One or More, 2 = Zero or One to Zero, 3 = Zero or One to exactly N. DATATYPE: Integer.
Property Type
- Read-write property
Syntax
Public Property CardinalityNo() As Variant
Remarks
Values may be:
Mandatory:
One to Zero or More = 0
One to One or More = 1
One to Zero or One = 2
One to Exactly N = 3
Optional:
Zero or One to Zero or More = 0
Zero or One to One or More = 1
Zero or One to Zero or One = 2
One to Exactly N = 3
Example
Sub Main
Dim d As Diagram
Dim m As Model
Dim rel As Relationship
Set d = DiagramManager.ActiveDiagram
Set m = d.ActiveModel
'Force every Relationship to be Mandatory and One-To-One or More
For Each rel In m.Relationships
rel. = 1
rel.CardinalityNo = 1
Next rel
End Sub
See Also