Exemple #1
0
        public bool GenerateRvtFileFromModelDataFolder(string strModelDataPath, DataFormatVersion dataFormatVersion, string strRvtFilePath, bool bCreateLocal, bool bOverwrite, ModelIdentity centralIdentity, string centralModelFullPath)
        {
            if (File.Exists(strRvtFilePath))
            {
                if (!bOverwrite)
                {
                    return(false);
                }
                File.Delete(strRvtFilePath);
            }
            IDictionary <string, string> nonElemStreamFiles        = new Dictionary <string, string>();
            IDictionary <int, string>    elemStreamFiles           = new Dictionary <int, string>();
            IDictionary <int, string>    steelIncrementStreamFiles = new Dictionary <int, string>();

            using (IModelDataVersionManager modelDataVersionManager = CreateModelDataVersionManager(strModelDataPath, dataFormatVersion))
            {
                if (!modelDataVersionManager.GetLatestStreamFiles(ref nonElemStreamFiles, ref elemStreamFiles, ref steelIncrementStreamFiles))
                {
                    return(false);
                }
            }
            if (!RvtFile.GenerateRvtFileFromModelFolder(nonElemStreamFiles, elemStreamFiles, steelIncrementStreamFiles, dataFormatVersion, strRvtFilePath))
            {
                return(false);
            }
            if (bCreateLocal && (object)centralIdentity != null && centralIdentity.isValid())
            {
                try
                {
                    var basicFileInfo = ReadFromRVTFile(strRvtFilePath);
                    if (basicFileInfo != null)
                    {
                        basicFileInfo.AllLocalChangesSavedToCentral = false;
                        basicFileInfo.Author                        = "Autodesk Revit";
                        basicFileInfo.CentralIdentity               = ModelIdentity.NewModelIdentity;
                        basicFileInfo.CentralPath                   = "";
                        basicFileInfo.Format                        = "2019";
                        basicFileInfo.Identity                      = ModelIdentity.NewModelIdentity;
                        basicFileInfo.IsLT                          = false;
                        basicFileInfo.IsSingleUserCloudModel        = false;
                        basicFileInfo.IsWorkshared                  = false;
                        basicFileInfo.LocaleWhenSaved               = "RUS";
                        basicFileInfo.OpenWorksetDefault            = 1;
                        basicFileInfo.SavedPath                     = "";
                        basicFileInfo.Username                      = "";
                        basicFileInfo.LatestCentralVersion          = 1;
                        basicFileInfo.UniqueDocumentVersionSequence = 1;
                        basicFileInfo.UniqueDocumentVersionGUID     = GUIDValue.NewGUIDValue();
                        basicFileInfo.LatestCentralEpisodeGUID      = GUIDValue.NewGUIDValue();
                        basicFileInfo.WorksharingState              = WorksharingState.WS_Central;
                    }
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            return(true);
        }
Exemple #2
0
 public ImportSettings()
 {
     this.taqDataFile       = (FileInfo)null;
     this.taqIndexFile      = (FileInfo)null;
     this.dataFormatVersion = DataFormatVersion.Version1;
     this.dataType          = DataType.Quote;
     this.symbolOption      = SymbolOption.Existents;
     this.symbols           = (string[])null;
 }
Exemple #3
0
 public ImportSettings()
 {
     eX4XcIhHpDXt70u2x3N.k8isAcYzkUOGF();
     // ISSUE: explicit constructor call
     base.\u002Ector();
     this.OoZn9gfXp = (FileInfo)null;
     this.cgB729ckl = (FileInfo)null;
     this.GuqLARiYy = DataFormatVersion.Version1;
     this.cQuiVdlGs = DataType.Quotes;
     this.Y4E9oe16h = SymbolOption.Existents;
     this.XIc3J9S4f = (string[])null;
 }
Exemple #4
0
 public ImportSettings()
 {
   this.taqDataFile = (FileInfo) null;
   this.taqIndexFile = (FileInfo) null;
   this.dataFormatVersion = DataFormatVersion.Version1;
   this.dataType = DataType.Quote;
   this.symbolOption = SymbolOption.Existents;
   this.symbols = (string[]) null;
 }
Exemple #5
0
        private IModelDataVersionManager CreateModelDataVersionManager(string modelDataPath, DataFormatVersion formatVersion)
        {
            IModelDataVersionManager modelDataVersionManager = new ModelDataVersionManager(modelDataPath, formatVersion);

            modelDataVersionManager.ModelPathUtils = SharedUtils.Instance.ModelPathUtils;
            return(modelDataVersionManager);
        }
Exemple #6
0
 public override int GetHashCode()
 {
     return((SystemId.GetHashCode() * 397) ^ (DataFormatVersion.GetHashCode() * 397) ^
            (SoftwareVersion.GetHashCode() * 397) ^ (MachineName.GetHashCode() * 397) ^
            (MacAddress.GetHashCode() * 397) ^ (IPAddress.GetHashCode() * 397));
 }
Exemple #7
0
 public ImportSettings()
 {
   eX4XcIhHpDXt70u2x3N.k8isAcYzkUOGF();
   // ISSUE: explicit constructor call
   base.\u002Ector();
   this.OoZn9gfXp = (FileInfo) null;
   this.cgB729ckl = (FileInfo) null;
   this.GuqLARiYy = DataFormatVersion.Version1;
   this.cQuiVdlGs = DataType.Quotes;
   this.Y4E9oe16h = SymbolOption.Existents;
   this.XIc3J9S4f = (string[]) null;
 }