Basic Rules are simple attributes of a design. The rule must return a value of a specific data type, which is included in the declaration of the rule. The long form of a rule specification begins with the Rule keyword and terminates with End Rule.
Rule numberOfBearings As Integer Return 2 End Rule
Rule totalSprocketWidth As Number Dim L As Number = sprocketWidth * numberOfSprockets If isDrive? Then totalSprocketWidth = L + driveSprocketSpacerLength _ - (sprocketHubRecess * 3) Else totalSprocketWidth = L - (sprocketHubRecess * 2) End If End Rule
Rule names can contain any number of alphabetic characters, numeric characters, underscores, question marks (?), or percent signs. Intent ignores the case of a rule name. The following names are considered to be the same when evaluated by Intent:
Rule numberOfBearings As Integer = 2
A special form of short-form rule uses the keyword Required in place of the rule expression. Required is a keyword that may only appear in this way; it is not a flag. Required rules may only be used in conjunction with the Canonical or Parameter flags. The Required keyword signifies to the compiler that this rule must be supplied (in the case of a Parameter), or that it must be assigned by a Group rule (in the case of a Canonical).
Rule numberOfBearings As Integer = Required