Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

OAPI SAP 2000 - Matlab

Status
Not open for further replies.

DavidCaste

Structural
Sep 2, 2014
1
Hi, I've been using the OAPI functions with Matlab in order to extract some analysis results from a computational model with shells, but now I'm having troubles with some functions. I have a cellstring with the names of the areas assigned to a section cut, then, when I try to get the Section Property name with the function GetProperty, Matlab shows this message:

No method 'GetProperty' with matching signature found for class
'Interface.SAP2000V16._cAreaObj'.

I don't know what's wrong with my code:

Name = AreaNames{1,1};
PropName = cellstr(' ');
[ret,Name,PropName]=SapObject.SapModel.AreaObj.GetProperty(Name,PropName);

Thanks for your help!
 
 http://files.engineering.com/getfile.aspx?folder=0b9d9de0-b797-413b-b3a3-858bfd4255b1&file=FuerzasSectionCuts.m
Replies continue below

Recommended for you

Hi! I've checked your code.
It seems "AreaNames" is an existing array containing "Objects Name" from a previos Get function
I'd suggest you to create a for loop to get the "PropName" for each item in the AreaNames array and store the output in a new variable if you want.
the code could be something like this:

PropName = cellstr(' ');
for i = 1:lenght(AreaNames)
[ret, PropName] = SapObject.SapModel.AreaObj.GetProperty(num2str(AreaName(i,1)),PropName);
end

you can remove the "Name" item next to the "ret" sentence since you already know the Name of the Area and thus is not a required output


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor