CodeSpec Class

A Code Specification captures the rules for encoding and decoding significant business information into and from a Code (string). This specification is used to generate and validate Codes.

A CodeSpec defines the format of a Code for a certain type of Element in an IModel. A CodeSpec can identify an external system that maintains and/or assigns Codes.

Methods

Name Description
create(iModel: IModel, name: string, scopeType: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement): CodeSpec Static Create a new CodeSpec from the specified parameters
> Note: CodeSpec.id will not be valid until inserted
 

Properties

Name Type Description
id Id64String The id of this CodeSpec.  
iModel IModel The iModel holding this CodeSpec.  
isManagedWithIModel Accessor boolean Will be true if the codes associated with this CodeSpec are managed along with the iModel and false if the codes are managed by an external service. Beta
isValid Accessor ReadOnly boolean Will be true if the id of this CodeSpec is valid.  
name string The name of this CodeSpec.  
scopeReq Accessor CodeScopeSpec.ScopeRequirement Will be CodeScopeSpec.ScopeRequirement.FederationGuid if the scoping element is required to have a FederationGuid or CodeScopeSpec.ScopeRequirement.ElementId otherwise (which is the default).  
scopeType Accessor CodeScopeSpec.Type The scope type of this CodeSpec.  
specScopeType Accessor CodeScopeSpec.Type The scope type of this CodeSpec. Deprecated

Defined in

Last Updated: 20 September, 2019