public override string WhereRule() { var result = base.WhereRule(); if (!ModelOf.Instances.Where <IfcDraughtingCallout>(dc => dc.Contents.Contains(this)).Any()) { result += "WR51: A dimension curve shall be used by at least one referencing dimension curve directed callout, i.e. it should not be used outside of the context of a dimension element group. \n"; } if (AnnotatedBySymbols.OfType <IfcDimensionCurveTerminator>().Count(t => t.Role == IfcDimensionExtentUsage.ORIGIN) > 1 || AnnotatedBySymbols.OfType <IfcDimensionCurveTerminator>().Count(t => t.Role == IfcDimensionExtentUsage.TARGET) > 1) { result += "WR52: The dimension curve should not be annotated with more than one terminator having the role \"Origin\", nor with more than one terminator having the role \"Target\". \n"; } if (AnnotatedBySymbols.Count(a => !(a is IfcDimensionCurveTerminator)) != 0) { result += "WR53: All terminators assigned to a dimension curve shall be dimension curve terminators. \n"; } return(result); }