SinaPeugeot
Structural
- May 30, 2010
- 37
Hi! I am really new to SAP2000 API and I am trying to use MATLAB to interact with SAP. I'm getting help from SAP2000 API documentation. I have built a model using SAP and saved it. Then I used the following code to open and analyze it using MATLAB interface. The problem is, I can't get any "Frame Force" results by API codes; and I get this error "No method 'FrameForce' with matching signature found for class 'Interface.Sap2000v12.cAnalysisResults'". I would REALLY appreciate any help:
feature('COM_SafeArraySingleDim', 1);
feature('COM_PassSafeArrayByRef', 1);
SapObject = actxserver('sap2000.SapObject');
SapObject.ApplicationStart;
ret = SapObject.SapModel.File.OpenFile('C:\....\1.sdb');
ret = SapObject.SapModel.Analyze.RunAnalysis();
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput;
ret = SapObject.SapModel.Results.Setup.SetCaseSelectedForOutput('DEAD');
Element = NaN;
StepNum=NaN;
NumberResults = NaN;
Obj = cellstr(' ');
ObjSta=0.5;
Elm = cellstr(' ');
ElmSta=NaN;
LoadCase = cellstr(' ');
StepType= cellstr(' ');
P = zeros(1,1,'double');
V2 = zeros(1,1,'double');
V3 = zeros(1,1,'double');
M2 = zeros(1,1,'double');
M3 = zeros(1,1,'double');
T = zeros(1,1,'double');
[ret, NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType, StepNum, P, V2, V3, T, M2, M3] =
SapModel.Results.FrameForce('1', Element, NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType, StepNum, P, V2, V3,
T, M2, M3)
feature('COM_SafeArraySingleDim', 1);
feature('COM_PassSafeArrayByRef', 1);
SapObject = actxserver('sap2000.SapObject');
SapObject.ApplicationStart;
ret = SapObject.SapModel.File.OpenFile('C:\....\1.sdb');
ret = SapObject.SapModel.Analyze.RunAnalysis();
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput;
ret = SapObject.SapModel.Results.Setup.SetCaseSelectedForOutput('DEAD');
Element = NaN;
StepNum=NaN;
NumberResults = NaN;
Obj = cellstr(' ');
ObjSta=0.5;
Elm = cellstr(' ');
ElmSta=NaN;
LoadCase = cellstr(' ');
StepType= cellstr(' ');
P = zeros(1,1,'double');
V2 = zeros(1,1,'double');
V3 = zeros(1,1,'double');
M2 = zeros(1,1,'double');
M3 = zeros(1,1,'double');
T = zeros(1,1,'double');
[ret, NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType, StepNum, P, V2, V3, T, M2, M3] =
SapModel.Results.FrameForce('1', Element, NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType, StepNum, P, V2, V3,
T, M2, M3)