×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SAP OAPI with MATLAB : for design result

SAP OAPI with MATLAB : for design result

SAP OAPI with MATLAB : for design result

(OP)
hi
I wrote the following code to compare the design results.
My goal is to choose the best level.
But in matlab the following error is displayed.
Can someone help me?


CODE

FrameName      = NET.createArray('System.String',NumberItems);
MyOption       = 1;
Location       = NET.createArray('System.Double',NumberItems);
ErrorSummary   = NET.createArray('System.String',NumberItems);
WarningSummary = NET.createArray('System.String',NumberItems);
NumberItems    = 3;
TopCombo       = NET.createArray('System.String',NumberItems);
TopArea        = NET.createArray('System.Double',NumberItems);
BotCombo       = NET.createArray('System.String',NumberItems);
BotArea        = NET.createArray('System.Double',NumberItems);
VmajorArea     = NET.createArray('System.Double',NumberItems);
TLCombo        = NET.createArray('System.String',NumberItems);
TLArea         = NET.createArray('System.Double',NumberItems);
TTCombo        = NET.createArray('System.String',NumberItems);
TTArea         = NET.createArray('System.Double',NumberItems);

Ret = Analyze.CreateAnalysisModel
DOF = NET.createArray('System.Boolean',6);

for i = 1 : 6

   DOF (i) = true();

end
Ret = Analyze.GetActiveDOF(DOF)
Ret = Analyze.RunAnalysis();

View.RefreshView();
if Ret ~= 0
    disp('!Add beam object View.RefreshView')
end
%% Design
disp('Design')
DesignConcrete = ...
        NET.explicitCast(SapModel.DesignConcrete,'SAP2000v19.cDesignConcrete');
 View = NET.explicitCast(SapModel.View,'SAP2000v19.cView');

    Ret = DesignConcrete.SetCode('ACI 318-11')
    Ret = DesignConcrete.StartDesign

View.RefreshView();
if Ret ~= 0
    disp('!Add beam object View.RefreshView')
end
[ret,NumberItems, FrameName,...
     Location, TopCombo, TopArea, BotCombo, BotArea, VmajorCombo, VmajorArea, TLCombo, TLArea, ...
     TTCombo, TTArea, ErrorSummary, WarningSummary] = ...
     DesignConcrete.GetSummaryResultsBeam(', NumberItems, FrameName,...
     Location, TopCombo, TopArea, BotCombo, BotArea, ...
     VmajorCombo, VmajorArea, TLCombo, TLArea, ...
     TTCombo, TTArea, ErrorSummary, WarningSummary,SAP2000v19.eItemType.Group);
 if Ret ~= 0
        disp('! Error at Design concrete.GetSummaryResultsBeam ')
 end
 for i=1:5
    if (TopArea(i)<= 0.08 & TopArea(i)>= 0.01)
     TopArea(i+1) >= TopArea(i)
    end
 end[/color]

But for this line:
      if (TopArea(i)<= 0.08 & TopArea(i)>= 0.01)
The error below shows 
[color #4E9A06]Message: Index was outside the bounds of the array.
Source:
HelpLink: 




Thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources