A modern, strongly-typed .NET wrapper for ETABS API (v22 and later).
- π― Strongly-typed API with full IntelliSense support
- π Automatic version detection and compatibility checking
- π Comprehensive coverage of ETABS functionality
- π‘οΈ Type-safe property management and operations
- π Extensive documentation with XML comments
- β‘ Performance optimized with lazy loading
- ETABS v22 or later must be installed on your machine
- .NET 10.0 or later
- Windows OS (ETABS is Windows-only)
dotnet add package EtabSharpusing EtabSharp.Core;
// Connect to running ETABS instance
using var etabs = ETABSWrapper.Connect();
if (etabs == null)
{
Console.WriteLine("No ETABS instance found. Please start ETABS first.");
return;
}
// Access model components
var model = etabs.Model;
// Create a concrete material
var concrete = model.Materials.AddConcreteMaterial("C30", fc: 30, ec: 25000);
// Create a rectangular column
var column = model.PropFrame.AddRectangularSection("COL-400x400", "C30", 400, 400);
// Add a frame between two points
var frame = model.Frames.AddFrame("1", "2", "COL-400x400");
// Run analysis
model.Analyze.CreateAnalysisModel();
model.Analyze.RunAnalysis();
// Get results
var displacements = model.AnalysisResults.GetJointDispl("", eItemTypeElm.Objects);Full documentation available at
This package does NOT include ETABSv1.dll. You must have ETABS installed on your machine. The wrapper will automatically locate the DLL from your ETABS installation.
- ETABS v22.x β
- ETABS v23.x β
- Earlier versions β (not supported)
MIT License - see LICENSE file for details.
Contributions welcome! Please read CONTRIBUTING.md first.
- π Documentation
- π Issue Tracker
- π¬ Discussions
EtabSharp/
βββ Core/ # Application & Model wrappers
β βββ ETABSApplication.cs
β βββ ETABSModel.cs
β βββ ETABSWrapper.cs
β βββ Models/
β
βββ Properties/ # Define β Section Properties
β βββ Materials/ # Define β Material
β β βββ MaterialManager.cs (implements IPropMaterial)
β β βββ Constants/
β β βββ Models/
β βββ Frames/ # Define β Frame Sections
β β βββ FramePropertyManager.cs (implements IPropFrame)
β β βββ Models/
β βββ Areas/ # Define β Slab & Wall
β β βββ AreaPropertyManager.cs (implements IPropArea)
β β βββ Models/
β βββ Links/ # Define β Link/Support
β β βββ (future)
β βββ Cables/ # Define β Cable
β βββ (future)
β
βββ Elements/ # Draw β Objects
β βββ Stories/ # Edit β Story
β β βββ StoryManager.cs (implements IStory)
β β βββ Models/
β βββ Points/ # Draw β Point
β β βββ PointObjectManager.cs (implements IPointObject)
β β βββ Models/
β βββ Frames/ # Draw β Frame
β β βββ FrameObjectManager.cs (implements IFrameObject)
β β βββ Models/
β βββ Areas/ # Draw β Slab/Wall
β β βββ AreaObjectManager.cs (implements IAreaObject)
β β βββ Models/
β βββ Selection/ # Select menu
β βββ SelectionManager.cs (implements ISelection)
β βββ Models/
β
βββ Labels/ # Define β Pier/Spandrel Labels
β βββ Piers/
β β βββ PierLabelManager.cs (implements IPierLabel)
β β βββ Models/
β βββ Spandrels/
β βββ SpandrelLabelManager.cs (implements ISpandrelLabel)
β βββ Models/
β
βββ Groups/ # Define β Groups
β βββ GroupManager.cs (implements IGroup)
β βββ Models/
β
βββ Loads/ # Define β Load Patterns/Cases/Combos
β βββ Patterns/
β β βββ LoadPatternManager.cs (implements ILoadPattern)
β β βββ Models/
β βββ Cases/
β β βββ LoadCaseManager.cs (implements ILoadCase)
β β βββ Models/
β βββ Combos/
β β βββ LoadComboManager.cs (implements ILoadCombo)
β β βββ Models/
β βββ Assignment/ # Assign β Loads
β βββ LoadAssignmentManager.cs
β βββ Models/
β
βββ Analysis/ # Analyze menu
β βββ AnalysisManager.cs (implements IAnalysis)
β βββ ResultSetup/
β β βββ ResultSetupManager.cs (implements IResultSetup)
β β βββ Models/
β βββ Results/
β β βββ ResultsManager.cs (implements IResults)
β β βββ Models/
β βββ Models/
β
βββ Design/ # Design menu
β βββ Concrete/
β β βββ ConcreteDesignManager.cs (implements IConcreteDesign)
β β βββ Models/
β βββ Steel/
β β βββ SteelDesignManager.cs (implements ISteelDesign)
β β βββ Models/
β βββ Shearwall/
β β βββ ShearwallDesignManager.cs (implements IShearwallDesign)
β β βββ Models/
β βββ Composite/
β β βββ (future)
β βββ Forces/ # Design β Steel/Concrete Frame Design Forces
β βββ DesignForceManager.cs
β βββ Models/
β
βββ Tables/ # Display β Show Tables (Ctrl+T)
β βββ DatabaseTableManager.cs (implements IDatabaseTable)
β βββ Models/
β
βββ System/ # File, Units, Model Info
β βββ FileManager.cs (implements IFiles)
β βββ UnitManager.cs (implements IUnitSystem)
β βββ ModelInfoManager.cs (implements ISapModelInfor)
β βββ Models/
β
βββ Interfaces/
β βββ Properties/
β βββ Elements/
β βββ Labels/
β βββ Groups/
β βββ Loads/
β βββ Analysis/
β βββ Design/
β βββ Tables/
β βββ System/
β
βββ Exceptions/
etabvcs/ # Root project
βββ Cargo.toml # Workspace configuration
βββ package.json # Frontend dependencies
βββ vite.config.ts
βββ tsconfig.json
βββ tailwind.config.js
βββ README.md
βββ .gitignore
β
βββ src/ # Frontend (React + TypeScript)
β βββ main.tsx
β βββ App.tsx
β βββ components/
β β βββ ModelViewer/
β β β βββ ModelViewer.tsx # 3D model visualization
β β β βββ StoryView.tsx # Story-by-story view
β β β βββ MemberList.tsx # Columns/Beams/Walls list
β β β βββ GridOverlay.tsx # Grid display
β β βββ VersionControl/
β β β βββ CommitHistory.tsx # Git commit history
β β β βββ CommitDialog.tsx # Commit changes dialog
β β β βββ DiffViewer.tsx # Show model differences
β β β βββ BranchSelector.tsx # Branch management
β β βββ DataTables/
β β β βββ StoriesTable.tsx # Stories data
β β β βββ PointsTable.tsx # Points coordinates
β β β βββ MembersTable.tsx # Structural members
β β β βββ LoadsTable.tsx # Load patterns/cases
β β βββ Analysis/
β β β βββ StatisticsPanel.tsx # Model statistics
β β β βββ ValidationResults.tsx # Validation errors
β β β βββ ComparisonView.tsx # Compare two models
β β βββ Settings/
β β βββ CliSettings.tsx # EtabSharp CLI path config
β β βββ GitConfig.tsx # Git user settings
β βββ store/
β β βββ index.ts
β β βββ modelSlice.ts # Current model state
β β βββ vcsSlice.ts # Version control state
β β βββ uiSlice.ts # UI state
β βββ hooks/
β β βββ useModel.ts # Model operations hook
β β βββ useVcs.ts # VCS operations hook
β β βββ useCli.ts # CLI interaction hook
β βββ types/
β βββ model.ts # TypeScript model types
β βββ vcs.ts # VCS types
β βββ api.ts # API response types
β
βββ src-tauri/ # Tauri backend (Rust)
β βββ Cargo.toml # Tauri app dependencies
β βββ tauri.conf.json
β βββ build.rs
β βββ icons/
β βββ src/
β βββ main.rs # Tauri app entry point
β β
β βββ commands/ # Tauri commands (exposed to frontend)
β β βββ mod.rs
β β βββ model_commands.rs # Model operations
β β β # - import_model(path) -> Model
β β β # - parse_e2k(path) -> E2KModel
β β β # - get_model_stats(id) -> Statistics
β β β # - export_model(id, format) -> Result
β β βββ vcs_commands.rs # Version control
β β β # - init_repository(path) -> Result
β β β # - commit_model(message, model) -> Commit
β β β # - get_history() -> Vec<Commit>
β β β # - checkout(commit_id) -> Model
β β β # - diff(commit1, commit2) -> Diff
β β β # - create_branch(name) -> Result
β β βββ cli_commands.rs # EtabSharp CLI bridge
β β β # - execute_cli(args) -> CliOutput
β β β # - get_cli_version() -> String
β β β # - convert_to_json(e2k_path) -> JsonPath
β β βββ validation_commands.rs # Model validation
β β # - validate_model(model) -> ValidationReport
β β # - check_references() -> Vec<Error>
β β
β βββ services/ # Business logic layer
β β βββ mod.rs
β β βββ model_service.rs # Model management service
β β β # - load_model(path) -> Result<Model>
β β β # - save_model(model) -> Result<()>
β β β # - calculate_statistics(model) -> Stats
β β βββ cli_service.rs # CLI spawning/communication
β β β # - spawn_cli(command) -> ChildProcess
β β β # - parse_cli_output(output) -> Result
β β β # - check_cli_available() -> bool
β β βββ git_service.rs # Git operations (using git2)
β β β # - init_repo(path) -> Repository
β β β # - create_commit(repo, msg) -> Oid
β β β # - get_commits(repo) -> Vec<Commit>
β β β # - checkout_commit(repo, id) -> Result
β β β # - create_diff(old, new) -> Diff
β β βββ storage_service.rs # Database operations
β β β # - save_snapshot(model) -> Result<i64>
β β β # - get_snapshot(id) -> Snapshot
β β β # - list_snapshots() -> Vec<Snapshot>
β β βββ diff_service.rs # Model comparison
β β # - compare_models(m1, m2) -> ModelDiff
β β # - detect_changes(old, new) -> ChangeSet
β β
β βββ models/ # Data structures
β β βββ mod.rs
β β βββ snapshot.rs # ModelSnapshot struct
β β βββ commit.rs # Commit metadata
β β βββ diff.rs # Diff structures
β β βββ stats.rs # Statistics structures
β β
β βββ db/ # Database layer
β β βββ mod.rs
β β βββ schema.rs # SQLx schema definitions
β β βββ connection.rs # DB connection pool
β β βββ migrations/ # SQL migration files
β β βββ 001_init.sql
β β βββ 002_add_snapshots.sql
β β βββ 003_add_commits.sql
β β
β βββ utils/ # Utility functions
β β βββ mod.rs
β β βββ file_utils.rs # File operations
β β βββ error_utils.rs # Error handling
β β
β βββ error.rs # Application error types
β
βββ e2k-parser/ # β SEPARATE LIBRARY CRATE
β βββ Cargo.toml
β βββ README.md
β βββ LICENSE
β βββ src/
β β βββ lib.rs # Library entry point
β β β
β β βββ parser/ # Parser implementation
β β β βββ mod.rs # Main parser orchestrator
β β β βββ primitives.rs # Basic parsers (number, string, etc.)
β β β βββ sections/ # Section-specific parsers
β β β β βββ mod.rs
β β β β βββ file_info.rs # Parse file metadata
β β β β βββ program_info.rs # Parse program info
β β β β βββ controls.rs # Parse CONTROLS section
β β β β βββ stories.rs # Parse STORIES section
β β β β βββ grids.rs # Parse GRIDS section
β β β β βββ materials.rs # Parse MATERIAL PROPERTIES
β β β β βββ rebar_defs.rs # Parse REBAR DEFINITIONS
β β β β βββ frame_sections.rs # Parse FRAME SECTIONS
β β β β βββ concrete_sections.rs # Parse CONCRETE SECTIONS
β β β β βββ shell_props.rs # Parse SLAB/WALL PROPERTIES
β β β β βββ points.rs # Parse POINT COORDINATES
β β β β βββ lines.rs # Parse LINE CONNECTIVITIES
β β β β βββ areas.rs # Parse AREA CONNECTIVITIES
β β β β βββ assignments.rs # Parse ASSIGNS sections
β β β β βββ loads.rs # Parse LOAD PATTERNS
β β β β βββ load_cases.rs # Parse LOAD CASES
β β β β βββ combinations.rs # Parse LOAD COMBINATIONS
β β β β βββ preferences.rs # Parse DESIGN PREFERENCES
β β β βββ utils.rs # Parser utilities
β β β
β β βββ model/ # Domain model
β β β βββ mod.rs # E2KModel struct
β β β βββ core.rs # Core model structures
β β β βββ geometry/ # Geometry structures
β β β β βββ mod.rs
β β β β βββ point.rs # Point struct + methods
β β β β βββ line.rs # Line struct + methods
β β β β βββ area.rs # Area struct + methods
β β β β βββ grid.rs # Grid struct
β β β βββ structural/ # Structural elements
β β β β βββ mod.rs
β β β β βββ story.rs # Story struct
β β β β βββ material.rs # Material struct
β β β β βββ section.rs # Section structs
β β β β βββ property.rs # Properties
β β β βββ loading/ # Load structures
β β β β βββ mod.rs
β β β β βββ pattern.rs # LoadPattern
β β β β βββ case.rs # LoadCase
β β β β βββ combination.rs # LoadCombination
β β β βββ design/ # Design data
β β β βββ mod.rs
β β β βββ preferences.rs # Design preferences
β β β
β β βββ validation/ # Validation system
β β β βββ mod.rs # Validator struct
β β β βββ rules/ # Validation rules
β β β β βββ mod.rs
β β β β βββ required_sections.rs # Check required sections
β β β β βββ reference_integrity.rs # Check point/line refs
β β β β βββ geometry_validity.rs # Check geometric validity
β β β βββ report.rs # ValidationReport
β β β
β β βββ query/ # Query interface
β β β βββ mod.rs # Query builder
β β β βββ builder.rs # Fluent query API
β β β βββ filters.rs # Filter functions
β β β
β β βββ export/ # Export functionality
β β β βββ mod.rs
β β β βββ json.rs # JSON export
β β β βββ csv.rs # CSV export
β β β
β β βββ error.rs # Error types
β β βββ prelude.rs # Common imports
β β
β βββ tests/
β β βββ integration_tests.rs
β β βββ parser_tests.rs
β β βββ validation_tests.rs
β β βββ fixtures/
β β βββ sample_simple.e2k
β β βββ sample_hotel.e2k
β β βββ invalid.e2k
β β
β βββ benches/
β β βββ parse_benchmark.rs # Performance benchmarks
β β
β βββ examples/
β βββ basic_parse.rs
β βββ validate_model.rs
β βββ export_json.rs
β
βββ EtabExtension.CLI/ # C# CLI (already exists)
β βββ ... (your existing C# project)
β
βββ docs/
βββ architecture.md
βββ api.md
βββ development.md