Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

For API in MATLAB, how to migrate from SAP2000 v14 to v21

Status
Not open for further replies.

zhddz

Civil/Environmental
Apr 2, 2010
15
0
0
CN
I updated my SAP2000 from v14 to v21, and found that my old MATLAB API code doesn't work any more. I'am trying to update my code, and got stucked.

My original code is like this:
ret = SapModel.PropLink.SetDamper("D1", MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp, 1, 0);
The code sets damper properties. It worked fine in SAP2000 v14, but doesn't work in v21.
MATLAB displays error: No appropriate method, property, or field 'GetDamper' for class 'SAP2000v1.wPropLink'.

Then, I change the code to this:
PropLink = NET.explicitCast(SapModel.PropLink,'SAP2000v1.cPropLink');
ret=PropLink.GetDamper("D1", MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp, 1, 0);
Doesn't work neither.
MATLAB displays error: No method 'GetDamper' with matching signature found for class 'SAP2000v1.cPropLink'.

I do not know what to do next, please help!
 
Replies continue below

Recommended for you

I use the etabs api and sometimes with new versions, I have found that the csi won't completely update their compiled html help docs.

Does matlab have a help function, when I run into trouble I use the help function:
python code:
help(SapModel.PropLink.SetDamper)

If you use in Matlab:
help SapModel.PropLink

does it return a statement?
 
Hello, rscassar:
Thank you for your help!

I've tried:
help SapModel.PropLink

and it returns:
SapModel is a variable of type SAP2000v1.cSapModel.

and help PropLink returns:
PropLink not found.

I still do not know how to fix the prolem.
 
Status
Not open for further replies.
Back
Top