kang47
Structural
- Jul 19, 2017
- 1
Hello:
I am trying to extract the base reactions from my model by accessing the SAP2000 API using MATLAB but I cannot get the program to return the correct values. The problem I am currently having is that it is returning an empty array for the My and a value of zero for my Mz. If anyone could offer some guidance or point me to a resource? I have copied and pasted my code for this function below. Thanks!
%run analysis
ret = SapModel.Analyze.RunAnalysis
%clear all case and combo output selections
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
%set case and combo output selections
ret = SapModel.Results.Setup.SetComboSelectedForOutput('MassCombo')
NumberResults=1;
LoadCase=cellstr('');
StepType=cellstr('');
StepNum = reshape(0:1,2,1);
Fx=reshape(0:1,2,1); Fy=reshape(0:1,2,1); Fz=reshape(0:1,2,1);
Mx=reshape(0:1,2,1); My=reshape(0:1,2,1); Mz=reshape(0:1,2,1);
gx=0; gy=0; gz=0;
%get base reactions
[ret,NumberResults,LoadCase,StepType,StepNum,Fx,Fy,Fz,Mx,My,Mz,gx,gy,gz] = SapModel.Results.BaseReact(NumberResults, LoadCase, StepType, StepNum, Fx, Fy, Fz, Mx, My, Mz, gx, gy, gz)
I am trying to extract the base reactions from my model by accessing the SAP2000 API using MATLAB but I cannot get the program to return the correct values. The problem I am currently having is that it is returning an empty array for the My and a value of zero for my Mz. If anyone could offer some guidance or point me to a resource? I have copied and pasted my code for this function below. Thanks!
%run analysis
ret = SapModel.Analyze.RunAnalysis
%clear all case and combo output selections
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
%set case and combo output selections
ret = SapModel.Results.Setup.SetComboSelectedForOutput('MassCombo')
NumberResults=1;
LoadCase=cellstr('');
StepType=cellstr('');
StepNum = reshape(0:1,2,1);
Fx=reshape(0:1,2,1); Fy=reshape(0:1,2,1); Fz=reshape(0:1,2,1);
Mx=reshape(0:1,2,1); My=reshape(0:1,2,1); Mz=reshape(0:1,2,1);
gx=0; gy=0; gz=0;
%get base reactions
[ret,NumberResults,LoadCase,StepType,StepNum,Fx,Fy,Fz,Mx,My,Mz,gx,gy,gz] = SapModel.Results.BaseReact(NumberResults, LoadCase, StepType, StepNum, Fx, Fy, Fz, Mx, My, Mz, gx, gy, gz)