GetInstancePropertyCardinalityRestriction (inline)

...

Syntax

public const string enginedll = @"engine.dll";

public static void GetInstancePropertyCardinalityRestriction(Int64 owlInstance, Int64 rdfProperty, out Int64 minCard, out Int64 maxCard)
        {
            Int64   owlClass = GetInstanceClassByIterator(owlInstance, 0);

            GetClassPropertyCardinalityRestriction(
                    owlClass,
                    rdfProperty,
                    out minCard,
                    out maxCard
                );

            owlClass = GetInstanceClassByIterator(owlInstance, owlClass);
            while (owlClass != 0)
            {
                Int64   myMinCard = -1,
                        myMaxCard = -1;

                GetClassPropertyCardinalityRestriction(
                        owlClass,
                        rdfProperty,
                        out myMinCard,
                        out myMaxCard
                    );

                if (minCard < myMinCard)
                    minCard = myMinCard;

                if (myMaxCard >= 0 &&
                    (maxCard == -1 || maxCard > myMaxCard))
                    maxCard = myMaxCard;

                owlClass = GetInstanceClassByIterator(owlInstance, owlClass);
            }
        }    

Property owlInstance

Size: 64 bit / 8 byte (value)
The handle to the specific instance in the design tree. The instance handle is static within one open model but is most probably different when the same instance is opened in another model. The instance is always exactly of one unique class.

Property rdfProperty

Size: 64 bit / 8 byte (value)
This attribute represents a handle to the property, this can be either a datatype property (attribute), an object property (relation) or non-defined property. The handle will be static during the life-time of the model, when the model (or part of it) is saved and opened again, the handle will most probably be different.

Property minCard

Size: 32 bit / 4 byte (reference)
The minimum cardinality (i.e. number of elements) of this property.

Property maxCard

Size: 32 bit / 4 byte (reference)
The maximum cardinality (i.e. number of elements) of this property.