diff --git a/FemDesign.Core/FemDesignConnection.cs b/FemDesign.Core/FemDesignConnection.cs index 6f24ab58..5be865a2 100644 --- a/FemDesign.Core/FemDesignConnection.cs +++ b/FemDesign.Core/FemDesignConnection.cs @@ -1016,10 +1016,6 @@ public FemDesign.Results.InteractionSurface RunInteractionSurface(FemDesign.Bars public void LoadGroupToLoadComb(bool fu = true, bool fua = true, bool fus = true, bool fsq = true, bool fsf = true, bool fsc = true, bool fSeisSigned = true, bool fSeisTorsion = true, bool fSeisZdir = true, bool fSkipMinDL = true, bool fForceTemp = true, bool fShortName = true) { - var version = Int32.Parse(this._process.MainModule.FileVersionInfo.FileVersion.Replace(".", ""), CultureInfo.InvariantCulture); - if (version < 22040) - throw new Exception("FEM-Design 22.00.004 or greater is required!"); - var cmdLoadGroupToLoadComb = new CmdLoadGroupToLoadComb(fu, fua, fus, fsq, fsf, fsc, fSeisSigned, fSeisTorsion, fSeisZdir, fSkipMinDL, fForceTemp, fShortName); string logfile = OutputFileHelper.GetLogfilePath(OutputDir); diff --git a/FemDesign.Grasshopper/Loads/Load groups/LoadGroupToLoadComb.cs b/FemDesign.Grasshopper/Loads/Load groups/LoadGroupToLoadComb.cs index 8020efa9..83e8e6e8 100644 --- a/FemDesign.Grasshopper/Loads/Load groups/LoadGroupToLoadComb.cs +++ b/FemDesign.Grasshopper/Loads/Load groups/LoadGroupToLoadComb.cs @@ -131,10 +131,29 @@ protected override void SolveInstance(IGH_DataAccess DA) var loadCombinations = new List(); + + #region Set Current Directory + bool fileExist = OnPingDocument().IsFilePathDefined; + if (!fileExist) + { + // hops issue + //var folderPath = System.IO.Directory.GetCurrentDirectory(); + string tempPath = System.IO.Path.GetTempPath(); + System.IO.Directory.SetCurrentDirectory(tempPath); + } + else + { + var filePath = OnPingDocument().FilePath; + var currentDir = System.IO.Path.GetDirectoryName(filePath); + System.IO.Directory.SetCurrentDirectory(currentDir); + } + #endregion + + // Create Task var t = Task.Run(() => { - var connection = new FemDesignConnection(minimized: true, tempOutputDir: false); + var connection = new FemDesignConnection(minimized: true); var model = new Model(countryCode, loadCases: _loadCases, loadGroups: loadGroups); model.Entities.Loads.LoadGroupTable.SimpleCombinationMethod = _combinationMethod;