×
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!

*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

ETABs API Database Tables - Apply Changes While Model is Locked

ETABs API Database Tables - Apply Changes While Model is Locked

ETABs API Database Tables - Apply Changes While Model is Locked

(OP)
I have been trying to make some upgrades to the section cut tool, mainly trying to prevent needless re-runs of the analysis if analysis has already run.
In doing this, I have checked to see if results are available, and if they are, I am skipping the run analysis call on the ETABs model. Skipping the run analysis function appears to be messing with applying edited tables for some reason.

My trouble comes in at these lines of code:

CODE --> C#

_SapModel.DatabaseTables.ApplyEditedTables(FillImportLog, ref NumFatalErrors, ref NumErrorMsgs, ref NumWarnMsgs, ref NumInfoMsgs, ref ImportLog);

            DatabaseTableInfo databaseTableInfo = new DatabaseTableInfo();
            databaseTableInfo.NumErrorMsgs = NumErrorMsgs;

            databaseTableInfo.ImportLog = ImportLog;
            //_SapModel.SetModelIsLocked(false);
            //_SapModel.Analyze.RunAnalysis();

            //Test if analysis needs to be run
            string mySelectedCase = LoadCaseComBox.SelectedItem.ToString();
            int index = LoadCaseList.FindIndex(x => x.MyName == mySelectedCase);
            //If results are available, do not rerun the analysis.
            if (LoadCaseList[index].Status != 4)
            {
                // Display the message box
                MessageBox.Show("This requires you to rerun the analysis", "Rerun", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                _SapModel.GetModelIsLocked();
                _SapModel.Analyze.RunAnalysis();
            }


            _SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput();
            _SapModel.Results.Setup.SetCaseSelectedForOutput(LoadCaseComBox.SelectedItem.ToString()); 

Again, when trying to skip Analyze.RunAnalysis() as shown in the conditional above, the _SapModel.DatabaseTables.ApplyEditedTables does not seem to be applied. There do not appear to be any errors in the ImportLog with the ApplyEdited.



Same appearance when working properly, but re-analysis required.



In addition, it perfectly acceptable in ETABs to create section cuts after the analysis is run and the model is locked. There should not be an issue with creating the section cuts at the end of the analysis from what I can tell.

File is up on github if you want to take a look at the code, ~line 635ish is where the code in question comes in.
https://github.com/retug/SectionCutter/blob/main/F...

I am guessing I am missing something simple, appreciate the second set of eyes!

S&T - www.re-tug.com

Replies continue below

Recommended for you

RE: ETABs API Database Tables - Apply Changes While Model is Locked

(OP)
A little more info, applyedited tables seems to acknowledge that only some tables are editable.



You can do add section cut through regular user interface with the model being locked,




In addition, the function returns 0 which means it was able to execute correctly, but that database table is not edited.



As I am typing this, I think I found the problem.

With the model unlocked, you have the following interactive tables available for editing through the typical GUI:



But, when the model is locked, this table disappears:



Seems like it should be available for editing even when locked.



S&T - www.re-tug.com

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! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close