Example #1
0
        /// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        protected void fillLoads(ILoadTimeHistory app)
        {
            if (app == null)
            {
                return;
            }
            app.GetLoads(Name,
                         out var loadTypes,
                         out var loadNames,
                         out var loadFunctions,
                         out var scaleFactor,
                         out var timeFactor,
                         out var arrivalTime,
                         out var coordinateSystems,
                         out var angles);

            _loads = new LoadsTimeHistory();
            for (int i = 0; i < loadTypes.Length; i++)
            {
                LoadTimeHistory loadTimeHistory = new LoadTimeHistory()
                {
                    LoadType         = loadTypes[i],
                    Load             = LoadPattern.Factory(_apiApp, loadNames[i]),
                    Function         = loadFunctions[i],
                    ScaleFactor      = scaleFactor[i],
                    TimeFactor       = timeFactor[i],
                    ArrivalTime      = arrivalTime[i],
                    CoordinateSystem = coordinateSystems[i],
                    Angle            = angles[i],
                };
                Loads.Add(loadTimeHistory);
            }
        }
Example #2
0
        /// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        protected void setLoads(ILoadTimeHistory app, LoadsTimeHistory loads)
        {
            app?.SetLoads(Name,
                          loads.Items.Select(x => x.LoadType).ToArray(),
                          loads.Items.Select(x => x.Load.Name).ToArray(),
                          loads.Items.Select(x => x.Function).ToArray(),
                          loads.Items.Select(x => x.ScaleFactor).ToArray(),
                          loads.Items.Select(x => x.TimeFactor).ToArray(),
                          loads.Items.Select(x => x.ArrivalTime).ToArray(),
                          loads.Items.Select(x => x.CoordinateSystem).ToArray(),
                          loads.Items.Select(x => x.Angle).ToArray());

            Loads = loads;
        }
Example #3
0
// TODO: SAP2000 complete time history
        /// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        protected void setLoads(ILoadTimeHistory app, LoadsTimeHistory loads)
        {
            app?.SetLoads(Name,
                          loads.ToArrayLoadTypes(),
                          loads.ToArrayNames(),
                          loads.ToArrayFunctions(),
                          loads.ToArrayScaleFactors(),
                          loads.ToArrayTimeFactor(),
                          loads.ToArrayArrivalTime(),
                          loads.ToArrayCoordinateSystems(),
                          loads.ToArrayAngles());

            Loads = loads;
        }
        /// <summary>
        /// Sets the loads.
        /// </summary>
        /// <param name="loads">The loads.</param>
        public void SetLoads(LoadsTimeHistory loads)
#endif
        {
            setLoads(_timeHistoryModalLinear, loads);
        }
 /// <summary>
 /// Sets the loads.
 /// </summary>
 /// <param name="loads">The loads.</param>
 public override void SetLoads(LoadsTimeHistory loads)
Example #6
0
 public abstract void SetLoads(LoadsTimeHistory loads);