Skip to main content

Python wrapper for SAP2000 API

Project description

ak_sap

Python wrapper for SAP2000. Generate/Analyze/Extract complex structural models using python.

GUI · Getting Started · Layout Documentation · Report Bug/Request Feature


GitHub commit activity GitHub last commit tests

Table of Contents

1. About the Project

2. Getting Started

2.1. Prerequisites

  1. Python 3.11 or above
  2. SAP2000 v24 or higher

2.2. Installation

2.2.1. Production

2.2.1.1. One line command
  1. Press Win + R to open the Run console

  2. Type "cmd" and press enter

  3. Type the following and press Enter

     curl -sSL https://links.struct.work/SAP2000 > %USERPROFILE%\Desktop\install.bat
    
  4. You should now have a install.bat file in your desktop

  5. Move this file to your desired installtion directory and run to install the AK_SAP module

2.2.1.2. Install directly from repo

Clone repo and Install with flit

git clone https://github.com/rpakishore/ak_sap.git
cd  ak_sap
pip install flit
  • If you want just the base package:

    flit install --deps production
    
  • Alternatively, if you also want to include the optional streamlit gui:

    flit install --deps production --extras gui
    
2.2.1.3. Install from Pypi release
pip install ak_sap

Note: The Pypi version does not ship with the optional streamlit gui

2.2.2. Development

Download the git and install via flit

git clone https://github.com/rpakishore/ak_sap.git
cd  ak_sap
pip install flit
flit install --pth-file

3. Usage

Initialize the module as below

from ak_sap import debug, Sap2000Wrapper
debug(status=False)

#Initialize
sap = Sap2000Wrapper(attach_to_exist=True)      #Attach to existing opened model
sap = Sap2000Wrapper(attach_to_exist=False)     #Create new blank model from latest SAP2000

## Create blank model from a custom version of SAP2000
sap = Sap2000Wrapper(attach_to_exist=False, program_path=r'Path\to\SAP2000.exe')

Parent level methods and attributes

sap.hide()                                  #Hide the SAP2000 window
sap.unhide()                                #Unhides SAP2000 window
sap.version                                 #Returns SAP2000 version number
sap.api_version                             #Returns Sap0API version number

sap.save(r'\Path\to\save\file.sdb')

3.1. GUI

The repo has an optional streamlit GUI for the wrapper. Checkout GUI.md for installation and usage instructions.

3.2. Layout Documentation

To see module level usage, check out the Layout.md or Usage.ipynb

4. Roadmap

Roadmap/Checklist

  • Generate Load Patterns
  • Generate Load Cases
  • Apply Loads
    • Points
    • Area
    • Line
  • Export joint reactions to Hilti-Profis file
  • Export Frame/Wall sections to S-Concrete

5. License

See LICENSE for more information.

6. Contact

Arun Kishore - @rpakishore

Project Link: https://github.com/rpakishore/ak_sap

7. Acknowledgements

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

ak_sap-0.0.2.tar.gz (187.7 kB view details)

Uploaded Source

Built Distribution

ak_sap-0.0.2-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file ak_sap-0.0.2.tar.gz.

File metadata

  • Download URL: ak_sap-0.0.2.tar.gz
  • Upload date:
  • Size: 187.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for ak_sap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e5b1a3087a9fc5ce893d8a066c136cbb82fb068d1b76d40650ac84e3836e14f6
MD5 8c5c4bc253429f06a88ef0091f370ca4
BLAKE2b-256 e1db8136c5d0f457a9fb4696e2bacb1b8af0282412fd997dae7b8f5d67114ffa

See more details on using hashes here.

File details

Details for the file ak_sap-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ak_sap-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for ak_sap-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 961e220c4ed8c7661be88ac7218ec59637e85aa148918e82f6929cf2c223145d
MD5 3f9ad8447ca198dfa1731f8746d42759
BLAKE2b-256 e35ba8cc32a132b656dc69512f2f47de0570cf8f261ec15e1454418f83f3c055

See more details on using hashes here.

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