コード例 #1
0
 /// <summary>
 /// Clear propertyset assignments to the internal Handle stored in the wrapper if it is incomplete
 /// </summary>
 /// <param name="element">the element</param>
 public void ClearInternalHandleWrapperData(Element element)
 {
     if (InternalWrapper.Count > 0)
     {
         HashSet <IFCAnyHandle> propertySetToCreate = null;
         if (PropertySetsToCreate.TryGetValue(element, out propertySetToCreate))
         {
             ICollection <IFCAnyHandle> internalObjects = InternalWrapper.GetAllObjects();
             foreach (IFCAnyHandle internalObj in internalObjects)
             {
                 propertySetToCreate.Remove(internalObj);
             }
         }
     }
 }
コード例 #2
0
        private void RegisterHandleWithElement(Element element, IFCAnyHandle handle, IFCExportInfoPair exportType = null)
        {
            if (element == null || IFCAnyHandleUtil.IsNullOrHasNoValue(handle))
            {
                return;
            }
            HashSet <IFCAnyHandle> propertySetToCreate = null;

            if (!PropertySetsToCreate.TryGetValue(element, out propertySetToCreate))
            {
                propertySetToCreate           = new HashSet <IFCAnyHandle>();
                PropertySetsToCreate[element] = propertySetToCreate;
            }
            propertySetToCreate.Add(handle);

            ExporterCacheManager.ElementToHandleCache.Register(element.Id, handle, exportType);
            ExporterCacheManager.HandleToElementCache.Register(handle, element.Id);
        }