public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(GlobalId != null ? GlobalId.ToStepValue() : "$"); parameters.Add(OwnerHistory != null ? OwnerHistory.ToStepValue() : "$"); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); parameters.Add(ConnectionGeometry != null ? ConnectionGeometry.ToStepValue() : "$"); parameters.Add(RelatingElement != null ? RelatingElement.ToStepValue() : "$"); parameters.Add(RelatedElement != null ? RelatedElement.ToStepValue() : "$"); parameters.Add(RelatingPriorities != null ? RelatingPriorities.ToStepValue() : "$"); parameters.Add(RelatedPriorities != null ? RelatedPriorities.ToStepValue() : "$"); parameters.Add(RelatedConnectionType.ToStepValue()); parameters.Add(RelatingConnectionType.ToStepValue()); return(string.Join(", ", parameters.ToArray())); }
/// <summary> /// Tests the express where-clause specified in param 'clause' /// </summary> /// <param name="clause">The express clause to test</param> /// <returns>true if the clause is satisfied.</returns> public bool ValidateClause(IfcRelConnectsPathElementsClause clause) { var retVal = false; try { switch (clause) { case IfcRelConnectsPathElementsClause.NormalizedRelatingPriorities: retVal = (Functions.SIZEOF(RelatingPriorities) == 0) || (Functions.SIZEOF(RelatingPriorities.Where(temp => ((0 <= temp) && (temp <= 100)))) == Functions.SIZEOF(RelatingPriorities)); break; case IfcRelConnectsPathElementsClause.NormalizedRelatedPriorities: retVal = (Functions.SIZEOF(RelatedPriorities) == 0) || (Functions.SIZEOF(RelatedPriorities.Where(temp => ((0 <= temp) && (temp <= 100)))) == Functions.SIZEOF(RelatedPriorities)); break; } } catch (Exception ex) { var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc4.SharedBldgElements.IfcRelConnectsPathElements>(); log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcRelConnectsPathElements.{0}' for #{1}.", clause, EntityLabel), ex); } return(retVal); }