lisandrojim
lisandrojim

Reputation: 509

Etabs - Matlab (API)

(You need to have MATLAB and ETABS installed in your computer to run the example)

I'm starting using the API MATLAB-ETABS, and I found an error which I hope you can help me to solve, next you'll find the code of the example:

clc, clear all, close all

NumberResults = NaN;
Obj = cellstr(' ');
Elm = cellstr(' ');
LoadCase = cellstr(' ');
StepType= cellstr(' ');
StepNum=NaN;
F1=zeros(1,1,'double');
F2=zeros(1,1,'double');
F3=zeros(1,1,'double');
M1=zeros(1,1,'double');
M2=zeros(1,1,'double');
M3=zeros(1,1,'double');

%    'create ETABS object
EtabsObject = actxserver('CSI.ETABS.API.ETABSObject')

%    'start ETABS application
ret = EtabsObject.ApplicationStart()

%    'create SapModel object
SapModel = EtabsObject.SapModel

%    'initialize model
ret = SapModel.InitializeNewModel()

%    'create steel deck template model
ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)

%    'run analysis
System.IO.Directory.CreateDirectory('c:\CSI_API_temp')
ret = SapModel.File.Save('C:\CSI_API_temp\example.edb')
ret = SapModel.Analyze.RunAnalysis

%    'deselect all cases and combos
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

%    'set case selected for output
ret = SapModel.Results.Setup.SetCaseSelectedForOutput('DEAD')

%    'get point displacements
ret = SapModel.Results.JointReact('1',1,NumberResults, Obj, Elm, LoadCase, StepType, StepNum, F1, F2, F3, M1, M2, M3)

%    'close ETABS
EtabsObject.ApplicationExit(1)

%    'clean up variables
clearvars SapModel EtabsObject

If you run that code, in your command windows will appear:

No method 'JointReact' with matching signature found for class
'Interface.ETABS_2015_Application_Programming_Interface__API_.cAnalysisResults'.

Upvotes: 1

Views: 2853

Answers (2)

Ibrahim
Ibrahim

Reputation: 138

set both applications to run as Administrator

and your problem will be solved

I tried the same and it worked for me hope it works for you .

Upvotes: 1

MoGh
MoGh

Reputation: 11

I had similar problem in VBA-ETABS, and when i changed "NumberResults" to integer value, my problem was solved. Also, I suggest you to use "SelectionElm" for "eItemTypeElm".

Upvotes: 1

Related Questions