internal string ExternalSystemName(IIfcRoot ifcObject) { if (ExternalReferenceMode == ExternalReferenceMode.IgnoreSystem || ExternalReferenceMode == ExternalReferenceMode.IgnoreSystemAndEntityName) { return(null); } return(GetCreatingApplication(ifcObject)); }
public string ExternalEntityName(IIfcRoot ifcObject) { if ( ExternalReferenceMode == ExternalReferenceMode.IgnoreEntityName || ExternalReferenceMode == ExternalReferenceMode.IgnoreSystemAndEntityName) { return(null); } return(ifcObject.GetType().Name); }
public string GetCreatingApplication(IIfcRoot ifcRootObject) { if (ifcRootObject.OwnerHistory.LastModifyingApplication != null) { return(ifcRootObject.OwnerHistory.LastModifyingApplication.ApplicationFullName); } if (ifcRootObject.OwnerHistory.OwningApplication != null) { return(ifcRootObject.OwnerHistory.OwningApplication.ApplicationFullName); } return(_creatingApplication); }
protected LoinItem(IIfcRoot root) { Id = root.EntityLabel; Identifier = Name = root.Name; Description = root.Description; UUID = root.GlobalId; if (root is Xbim.Ifc4.Kernel.IfcDefinitionSelect def) { Name = def.GetName(lang) ?? root.Name; Description = def.GetDescription(lang) ?? root.Description; } }
public string ExternalEntityIdentity(IIfcRoot ifcObject) { switch (EntityIdentifierMode) { case EntityIdentifierMode.IIfcEntityLabels: return(ifcObject.EntityLabel.ToString(CultureInfo.InvariantCulture)); case EntityIdentifierMode.GloballyUniqueIds: return(ifcObject.GlobalId); default: return(null); } }
internal IfcValidationMessage Put(Qualifier modelQualifier, IIfcRoot ifcObject) { if (null == ifcObject.GlobalId) { return(IfcValidationMessage.ByResult(_nextIndex++, null, IfcReportDomain.Schema, ID_SOURCE, "Not set", ID_REASON)); } List <IfcInstanceRef> refs; var @ref = new IfcInstanceRef { Qualifier = modelQualifier, InstanceHandle = new XbimInstanceHandle(ifcObject) }; var ifcGuid = ifcObject.GlobalId.ToString(); if (GuidStore.TryGetValue(ifcGuid, out refs)) { refs.Add(@ref); return(IfcValidationMessage.ByResult( _nextIndex++, null, IfcReportDomain.SchemaConstraint, ID_SOURCE, "Not unique", ID_REASON, ifcObject.ExpressType.ExpressName, ifcGuid)); } else { GuidStore.Add(ifcGuid, new List <IfcInstanceRef>() { @ref }); return(IfcValidationMessage.ByResult( _nextIndex++, null, IfcReportDomain.Passed, ID_SOURCE, "Set & unique", ID_REASON, ifcGuid)); } }