/// <inheritdoc /> /// <summary> /// Returns the case type, design type, and auto flag for the specified load case. /// </summary> /// <param name="nameLoadCase">The name of an existing load case.</param> /// <param name="loadCaseType">Load case type corresponding to the name provided.</param> /// <param name="loadCaseSubType">Load case sub-type corresponding to the name provided.</param> /// <param name="designType">Load case design type corresponding to the name provided.</param> /// <param name="designTypeOption">Load case type corresponding to the name provided.</param> /// <param name="autoCreatedCase">This is a value indicating if the load case has been automatically created.</param> /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception> public void GetCaseTypes(string nameLoadCase, out eLoadCaseType loadCaseType, out int loadCaseSubType, out eLoadPatternType designType, out eSpecificationSource designTypeOption, out eAutoCreatedCase autoCreatedCase) { loadCaseType = 0; loadCaseSubType = 0; designType = 0; CSiProgram.eLoadCaseType csiCaseType = CSiProgram.eLoadCaseType.Modal; CSiProgram.eLoadPatternType csiPatternType = CSiProgram.eLoadPatternType.Dead; int csiDesignTypeOption = 0; int csiAutoCreatedCase = 0; _callCode = _sapModel.LoadCases.GetTypeOAPI_1(nameLoadCase, ref csiCaseType, ref loadCaseSubType, ref csiPatternType, ref csiDesignTypeOption, ref csiAutoCreatedCase); if (throwCurrentApiException(_callCode)) { throw new CSiException(API_DEFAULT_ERROR_CODE); } loadCaseType = EnumLibrary.Convert(csiCaseType, loadCaseType); designType = EnumLibrary.Convert(csiPatternType, designType); designTypeOption = (eSpecificationSource)csiDesignTypeOption; autoCreatedCase = (eAutoCreatedCase)csiAutoCreatedCase; }
public void GetCaseTypes(string nameLoadCase, ref eLoadCaseType loadCaseType, ref int loadCaseSubType, ref eLoadPatternType designType, ref eSpecificationSource designTypeOption, ref eAutoCreatedCase autoCreatedCase) { }
/// <summary> /// This function retrieves the names of all defined load cases of the specified type. /// </summary> /// <param name="namesOfLoadCaseType">Names of all load cases of the specified type.</param> /// <param name="caseType">Load case type for which names are desired.</param> /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception> public void GetNameList(out string[] namesOfLoadCaseType, eLoadCaseType caseType) { namesOfLoadCaseType = new string[0]; _callCode = _sapModel.LoadCases.GetNameList(ref _numberOfItems, ref namesOfLoadCaseType, EnumLibrary.Convert <eLoadCaseType, CSiProgram.eLoadCaseType>(caseType)); if (throwCurrentApiException(_callCode)) { throw new CSiException(API_DEFAULT_ERROR_CODE); } }
GetNameList(this cLoadCases obj, eLoadCaseType CaseType = (eLoadCaseType)0) { int NumberNames; NumberNames = default(int); string[] MyName; MyName = default(string[]); var res = obj.GetNameList(ref NumberNames, ref MyName, CaseType); return(NumberNames, MyName); }
/// <summary> /// This function retrieves the names of all defined load cases of the specified type. /// </summary> /// <param name="numberNames">The number of load case names retrieved by the program.</param> /// <param name="namesOfLoadCaseType">Names of all load cases of the specified type.</param> /// <param name="caseType">Load case type for which names are desired.</param> /// <exception cref="CSiException"></exception> public void GetNameList(ref int numberNames, ref string[] namesOfLoadCaseType, eLoadCaseType caseType) { _callCode = _sapModel.LoadCases.GetNameList(ref numberNames, ref namesOfLoadCaseType, EnumLibrary.Convert <eLoadCaseType, CSiProgram.eLoadCaseType>(caseType)); if (throwCurrentApiException(_callCode)) { throw new CSiException(); } }
GetTypeOAPI(this cLoadCases obj, string Name) { eLoadCaseType CaseType; CaseType = default(eLoadCaseType); int SubType; SubType = default(int); var res = obj.GetTypeOAPI(Name, ref CaseType, ref SubType); return(CaseType, SubType); }
GetTypeOAPI_1(this cLoadCases obj, string Name) { eLoadCaseType CaseType; CaseType = default(eLoadCaseType); int SubType, DesignTypeOption, Auto; SubType = DesignTypeOption = Auto = default(int); eLoadPatternType DesignType; DesignType = default(eLoadPatternType); var res = obj.GetTypeOAPI_1(Name, ref CaseType, ref SubType, ref DesignType, ref DesignTypeOption, ref Auto); return(CaseType, SubType, DesignType, DesignTypeOption, Auto); }
/// <summary> /// Gets the case sub types. /// </summary> /// <param name="type">The type.</param> /// <param name="subType">Type of the sub.</param> /// <returns>MPT.CSI.API.Core.Program.ModelBehavior.Definition.eLoadCaseSubType.</returns> protected static eLoadCaseSubType getCaseSubTypes(eLoadCaseType type, int subType) { switch (type) { case eLoadCaseType.NonlinearStatic: switch (subType) { case 1: return(eLoadCaseSubType.Nonlinear); case 2: return(eLoadCaseSubType.NonlinearStagedConstruction); default: return(eLoadCaseSubType.Error); } case eLoadCaseType.Modal: switch (subType) { case 1: return(eLoadCaseSubType.Eigen); case 2: return(eLoadCaseSubType.Ritz); default: return(eLoadCaseSubType.Error); } case eLoadCaseType.LinearModalTimeHistory: switch (subType) { case 1: return(eLoadCaseSubType.Transient); case 2: return(eLoadCaseSubType.Periodic); default: return(eLoadCaseSubType.Error); } default: return(eLoadCaseSubType.Error); } }
/// <summary> /// Gets the case sub types. /// </summary> /// <param name="type">The type.</param> /// <param name="subType">Type of the sub.</param> /// <returns>System.Int32.</returns> protected static int getCaseSubTypes(eLoadCaseType type, eLoadCaseSubType subType) { switch (type) { case eLoadCaseType.NonlinearStatic: switch (subType) { case eLoadCaseSubType.Nonlinear: return(1); case eLoadCaseSubType.NonlinearStagedConstruction: return(2); default: return(0); } case eLoadCaseType.Modal: switch (subType) { case eLoadCaseSubType.Eigen: return(1); case eLoadCaseSubType.Ritz: return(2); default: return(0); } case eLoadCaseType.LinearModalTimeHistory: switch (subType) { case eLoadCaseSubType.Transient: return(1); case eLoadCaseSubType.Periodic: return(2); default: return(0); } default: return(0); } }
/// <summary> /// Factories the specified application. /// </summary> /// <param name="analyzer">The analyzer.</param> /// <param name="loadPatterns">The load patterns.</param> /// <param name="loadCases">The load cases.</param> /// <param name="uniqueName">Name of the unique.</param> /// <returns>MPT.CSI.OOAPI.Core.Program.Model.Loads.LoadCase.</returns> internal static LoadCase Factory( Analyzer analyzer, LoadPatterns loadPatterns, LoadCases loadCases, string uniqueName, eLoadCaseType loadCaseType, eLoadCaseSubType loadCaseSubType) { switch (loadCaseType) { case eLoadCaseType.LinearStatic: return(StaticLinear.Factory(analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.Nonlinear: return(StaticNonlinear.Factory(analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.NonlinearStagedConstruction: return(StaticNonlinearStaged.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Eigen: return(ModalEigen.Factory(analyzer, uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Ritz: return(ModalRitz.Factory(analyzer, uniqueName)); case eLoadCaseType.ResponseSpectrum: return(ResponseSpectrum.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.LinearModalTimeHistory: return(TimeHistoryModalLinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.NonlinearModalTimeHistory: return(TimeHistoryModalNonlinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.LinearDirectIntegrationTimeHistory: return(TimeHistoryDirectLinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: return(TimeHistoryDirectNonlinear.Factory(analyzer, loadCases, uniqueName)); default: return(null); } }
/// <summary> /// Gets the case types. /// </summary> public void FillCaseTypes() { if (_apiLoadCases == null) { return; } _apiLoadCases.GetCaseTypes(Name, out var loadCaseType, out var loadCaseSubType, out var designType, out var designTypeOption, out var autoCreatedCase); _type = loadCaseType; _subType = getCaseSubTypes(loadCaseType, loadCaseSubType); _designType = designType; _designTypeOption = designTypeOption; _autoCreatedCase = autoCreatedCase; }
/// <summary> /// Adds the specified unique name. /// </summary> /// <param name="uniqueName">Name of the unique.</param> /// <param name="caseType">Type of the case.</param> /// <param name="loadCaseSubType">Type of the load case sub.</param> /// <returns>System.Boolean.</returns> public bool Add( string uniqueName, eLoadCaseType caseType, eLoadCaseSubType loadCaseSubType = eLoadCaseSubType.None) { switch (caseType) { case eLoadCaseType.LinearStatic: return(AddStaticLinear(uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.Nonlinear: return(AddStaticNonlinear(uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.NonlinearStagedConstruction: return(AddStaticNonlinearStaged(uniqueName)); case eLoadCaseType.ResponseSpectrum: return(AddResponseSpectrum(uniqueName)); case eLoadCaseType.LinearDirectIntegrationTimeHistory: return(AddTimeHistoryDirectLinear(uniqueName)); case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: return(AddTimeHistoryDirectNonlinear(uniqueName)); case eLoadCaseType.LinearModalTimeHistory: return(AddTimeHistoryModalLinear(uniqueName)); case eLoadCaseType.NonlinearModalTimeHistory: return(AddTimeHistoryModalNonlinear(uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Eigen: return(AddModalEigen(uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Ritz: return(AddModalRitz(uniqueName)); default: return(false); } }
public static void GetLoadCases(ref cSapModel Model, ref string[] LoadCaseNames, ref double[] LoadCaseMultipliers, ref string[] LoadCaseTypes) { int NumberNames = 0; int ret = Model.LoadCases.GetNameList(ref NumberNames, ref LoadCaseNames); LoadCaseMultipliers = new double[NumberNames]; LoadCaseTypes = new string[NumberNames]; foreach (string lcname in LoadCaseNames) { //Parameters that we need to get //dummy eLoadCaseType eLoadCaseType cType = eLoadCaseType.LinearStatic; int subType = 0; int pos = Array.IndexOf(LoadCaseNames, lcname); //get the load case type ret = Model.LoadCases.GetTypeOAPI(lcname, ref cType, ref subType); LoadCaseTypes[pos] = cType.ToString(); } }
/// <summary> /// Returns the names of all defined load cases of the specified type. /// </summary> /// <param name="caseType">Load case type for which names are desired.</param> /// <returns>List<System.String>.</returns> public static List <string> GetNameList(eLoadCaseType caseType) { return(new List <string>(_loadCases.GetNameList(caseType))); }
// eLoadCaseType internal static CSiProgram.eLoadCaseType ToCSi(eLoadCaseType enumValue) { return((CSiProgram.eLoadCaseType)enumValue); }
public void Count(eLoadCaseType caseType) { }
/// <summary> /// Returns the names of all defined load cases of the specified type. /// </summary> /// <param name="caseType">Load case type for which names are desired.</param> /// <param name="loadcases">The loadcases.</param> /// <returns>System.Collections.Generic.List<System.String>.</returns> internal static List <string> GetNameList(ApiLoadCase loadcases, eLoadCaseType caseType) { return(new List <string>(loadcases.GetNameList(caseType))); }
public void GetNameList(ref int numberNames, ref string[] namesOfLoadCaseType, eLoadCaseType caseType) { }
/// <summary> /// Returns the names of all defined load cases of the specified type. /// </summary> /// <param name="caseType">Load case type for which names are desired.</param> /// <returns>List<System.String>.</returns> public List <string> GetNameList(eLoadCaseType caseType) { return(LoadCase.GetNameList(_apiLoadCases, caseType)); }
/// <summary> /// This function returns the total number of defined load cases in the model of a specified load case type. /// </summary> /// <param name="caseType">Load case type for which a count is desired. /// If 'all' is selected, a count is returned for all load cases in the model regardless of type.</param> /// <returns>System.Int32.</returns> public int Count(eLoadCaseType caseType) { return(_sapModel.LoadCases.Count(EnumLibrary.Convert <eLoadCaseType, CSiProgram.eLoadCaseType>(caseType))); }