フィルターのクリア

Opening a sap2000 model

1 回表示 (過去 30 日間)
Daniel
Daniel 2022 年 6 月 25 日
コメント済み: Reza 2023 年 9 月 26 日
Hi,
I am trying to open a sap2000.v21 model in MATLAB. I'm using the SM Toolbox Version 6.0.4 Instructions but it gives me an error in the syntax. I show you the code an the error. I'm sorry for my english.
Any help would be really appreciated.
Thanks
%clean up the workspace of matlab
clc;
clear;
%determine the type of application and its version
SM.App( 'sap' );
SM.Ver( '21' );
%create Sap2000 object
APIDLLPath ='C:\Program Files\Computers and Structures\SAP2000 21\SAP2000v1.dll';
ProgramPath ='C:\Program Files\Computers and Structures\SAP2000 21\SAP2000.exe';
[ Sobj ] = SM.Helper.CreateObject( ProgramPath,APIDLLPath );
%create SapModel object
[ Smdl ]=SM.SapModel();
%start Sap2000 application
SM.ApplicationStart;
%initialize model
ret = SM.InitializeNewModel;
%open an existing file
ModelName = 'Example 1-019a.sdb';
ModelPath = fullfile(pwd,'Analysis Examples',ModelName);
ret = SM.File.OpenFile(ModelPath);
%close Sap2000
SM.ApplicationExit (false);
Undefined function 'contains' for input arguments of type 'char'.
Error in SM.Helper.CreateObject (line 8)
Error in Ex_SM_File_OpenFile (line 10)
[ Sobj ] = SM.Helper.CreateObject( ProgramPath,APIDLLPath );
  1 件のコメント
Reza
Reza 2023 年 9 月 26 日
Hi
Please download the latest version of SM toolox.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by