Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

i want run sap2000 from matlab and show results in matlab

Status
Not open for further replies.

sajeer379mms

Structural
Sep 21, 2013
4
Hi Friends,
I'm using Sap2000 OAPI from Matlab
now I know how to open, run, save, hide, close
ie, this is my code,

%% clean-up the workspace & command window
clear;
clc;
%% pass data to Sap2000 as one-dimensional arrays
feature('COM_SafeArraySingleDim', 1);
%% pass non-scalar arrays to Sap2000 API by reference
feature('COM_PassSafeArrayByRef', 1);
%% create Sap2000 object
SapObject = actxserver('sap2000v15.SapObject');
%% start Sap2000 application
SapObject.ApplicationStart;
%% create SapModel object
Sap = SapObject.SapModel;
%% Hide Application, Hide <=> Visible
% SapObject.Hide;
%% open file
Sap.File.OpenFile('C:\Users\BRNS 1_8 WITH INFILL WITH OPENING MESHING.sdb');
%% run model (this will create the analysis model)
Sap.Analyze.RunAnalysis();
%% save model
Sap.File.Save('C:\Users\BRNS 1_8 WITH INFILL WITH OPENING MESHING.sdb');
%% close Sap2000
SapObject.ApplicationExit(false());
SapModel = 0;
SapObject = 0;

%% END

this working properly. but I don't know how to edit time history value(functn), load case, area edge constrains and how I can get result like frequency, so please help me to get those results...

%% get modal period
NumberResults = 'As Long';
LoadCase = 'As String';
StepType = 'As String';
StepNum = 'As Double';
Period = 'As Double';
Frequency = 'As Double';
CircFreq = 'As Double';
EigenValue = 'As Double';

Sap.Results.ModalPeriod(NumberResults, LoadCase, StepType, StepNum, Period, Frequency, CircFreq, EigenValue)

%% END

I used this to get frequency but it showing some error like this

No method 'ModalPeriod' with matching signature found for class
'Interface.020E9225_C884_4E04_ABD2_B91D15E6A45B'.

Error in my_sap_working (line 45)
Sap.Results.ModalPeriod(NumberResults, LoadCase, StepType, StepNum, Period, Frequency, CircFreq, EigenValue)


I found some people used $2k file, how use that? please help me...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor