Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

SAP2000 using MATLAB, import section .pro file

Status
Not open for further replies.

thib

Civil/Environmental
Joined
Feb 24, 2013
Messages
2
Location
US
Hi all,

My SAP200 has no section (steel) by default. So I need to import them.
I am using MATLAB to command SAP. Does anyone know the command to ask SAP to import a file.pro?

Thanks,
Thib
 
Hi,

Try this:

ret = SapModel.PropFrame.ImportProp(newsection, mat, 'AISC.PRO', SectionName);

newsection is what you want to name the imported section
mat is the material of the section
SectionName is the name of the section that you are importing from AISC.pro
 
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

Back
Top