Skip to main content

Python App to control and manipulate SAP2000 Model

Project description

banner

Python app to aid in SAP analysis.

View Demo · Documentation · Report Bug · Request Feature


GitHub commit activity GitHub last commit tests

Table of Contents

1. About the Project

Python wrapper for SAP2000 application

1.1. Features

  • Modal Analysis
    • Can run modal analysis to capture the required modal participation, per CSA
  • Response Spectrum
    • Can setup, solve and run response spectrum analysis on SAP
  • Template Setup
    • Can quickly and consistently deploy Template SAP settings to any open SAP model.

2. Getting Started

2.1. Prerequisites

Requires Python 3.10+

2.2. Dependencies

Create the virutual environment and install dependencies

  python -m venv .venv
  .venv\Scripts\activate.bat
  pip install flit

2.3. Installation

Install sap2000 and dependencies with flit

  flit install

3. Usage

Ensure the SAP file you would like to manipulate is already open.

A script to run analysis and save the model to a new location.

  import sap2000
  sap = sap2000.attach()
  sap.analyze(all_cases=True)
  sap.save_model(savepath=r"\path\to\save\file.sdb")

3.1. Interact with database tables

List available tables

  sap.Table.available

Get Table values

  sap.Table.get("Project Information")

Show table information and column descriptions

  sap.Table.col_description('Area Loads - Uniform')

3.2. Units

You can use this module to get the current active units in the model or set a specific unit system.

Get Units Returns a tuple of forallpeople instance for the force and distance, and a string for the temperature (C/F). The force and distance can be directly multiplied with the numerical values to get consistent units and ease of calculation or presentation.

  $ sap.Units.get()
  (1.000 kN, 1.000 m, 'C')

Set Units

Number Force Distance Temperature
1 lbf in F
2 lbf ft F
3 kip in F
4 kip ft F
5 kN mm C
6 kN m C
7 kgf mm C
8 kgf m C
9 N mm C
10 N m C
11 Ton mm C
12 Ton m C
13 kN cm C
14 kgf cm C
15 N cm C
16 Ton cm C
  sap.Units.set(5)

4. Roadmap

  • Beam Design
    • Generate S-Concrete files with correct loadcases for any/all beams in project.
    • Get beam/column design summary.

5. License

Distributed under the no License. See LICENSE.txt for more information.

6. Contact

Arun Kishore - @rpakishore

Project Link: https://github.com/rpakishore/sap-analysis

7. Acknowledgements

Use this section to mention useful resources and libraries that you have used in your projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sap2000-0.0.1.tar.gz (3.0 MB view hashes)

Uploaded Source

Built Distribution

sap2000-0.0.1-py2.py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page