(API) Modal Analysis Results

(API) Modal Analysis Results

Anonymous
Not applicable
1,101 Views
5 Replies
Message 1 of 6

(API) Modal Analysis Results

Anonymous
Not applicable

Hello,

 

I need to export the modal results (frequency and Eigen Vector, see in picture attached) for Excel by API. Is this possible? I already see in the forum, but i cant find any information about this.

 

regards

0 Likes
1,102 Views
5 Replies
Replies (5)
Message 2 of 6

Rafal.Gaweda
Autodesk Support
Autodesk Support
Dim RDD As RobotDisplacementData
Dim Nodes  As RobotNodeServer
Dim RES As RobotEigenvectorsServer
Dim REV As RobotEigenvaluesServer


Set Nodes = RobApp.Project.Structure.Nodes
Set RES = RobApp.Project.Structure.Results.Advanced.Eigenvectors
Set REV = RobApp.Project.Structure.Results.Advanced.Eigenvalues

Modalcase = 3
NModes = RobApp.Project.Structure.Cases.Get(Modalcase).ModesCount
row = 1

For I = 1 To Nodes.GetAll.Count

    NodeNumber = Nodes.GetAll.Get(I).Number

    For Modenum = 1 To NModes
    
        Set RDD = RES.Value(NodeNumber, Modalcase, Modenum)
        Cells(row, 1) = Str(NodeNumber) + " / " + Str(Modalcase) + " / " + Str(Modenum)
        Cells(row, 2) = REV.Value(Modalcase, Modenum).Frequence
        Cells(row, 3) = RDD.UX
        Cells(row, 4) = RDD.UY
        Cells(row, 5) = RDD.UZ
        row = row + 1
    Next Modenum
    
Next I

 



Rafal Gaweda
0 Likes
Message 3 of 6

Anonymous
Not applicable

Thank you Rafal, i'll test the code!! 😄

I have one more question, when i have my model calculated and i change one section, for example, appear a messange box that will change the results (img attch), is there anyway to put "yes" automatically or do something for this message dont appear?

 

regards

0 Likes
Message 4 of 6

Rafal.Gaweda
Autodesk Support
Autodesk Support
0 Likes
Message 5 of 6

Anonymous
Not applicable

Rafal,

 

I have an error in this line of code:

 

NModes = RobApp.Project.Structure.Cases.Get(Modalcase).ModesCount

 

I see that in code you dont Dim the variable "NModes" so i do:

 

Dim NModes as RobotCaseServer

 

But i still have the same error, so i saw that i dont have the option ".ModesCount", after the ".Get(Modalcase)

 

what is wrong?

0 Likes
Message 6 of 6

Anonymous
Not applicable

oh, i already figure it out, its "NModes = RobApp.Project.Structure.Cases.GetCmpntCount(Modalcase)" 😄 thank you anyway 😄

0 Likes