Message 1 of 5

Not applicable
10-26-2017
11:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @Anonymous
PLease try:
Dim RNDD As RobotNodeDisplacementData then in loop Set RNDD = Robapp.Project.Structure.Results.Nodes.Buckling.EigenVector(....
Hi,
It seems that You do everything fine, and this may be a bug in RSA.
There is always a workaround - instead of EigenvectorServer You may use AnyResultServer:
Dim NEWRES As RobotUniversalResultAccess Set NEWRES = Robapp.Project.Structure.Results.Any Dim ux As Double Dim uy As Double Dim uz As Double Dim ux2 As Double Dim uy2 As Double Dim uz2 As Double Set AllObjects = Robapp.Project.Structure.Nodes.GetAll Robapp.Project.Structure.ResultsFreeze = False Robapp.Project.CalcEngine.AutoFreezeResults = False For ii = 1 To AllObjects.Count Set Node = AllObjects.Get(ii) Cells(row, 2) = Node.Number Cells(row, 4) = Node.X Cells(row, 5) = Node.Y Cells(row, 6) = Node.Z NEWRES.Node = Node.Number NEWRES.LoadCase = 1 NEWRES.Mode = mode1 NEWRES.ResultId = 234 ux = NEWRES.ResultValue NEWRES.ResultId = 235 uy = NEWRES.ResultValue NEWRES.ResultId = 236 uz = NEWRES.ResultValue Cells(row, 9) = ux Cells(row, 10) = uy Cells(row, 11) = uz NEWRES.Mode = mode2 NEWRES.ResultId = 234 ux2 = NEWRES.ResultValue NEWRES.ResultId = 235 uy2 = NEWRES.ResultValue NEWRES.ResultId = 236 uz2 = NEWRES.ResultValue Cells(row, 13) = sf * ux2 + ux Cells(row, 14) = sf * uy2 + uy Cells(row, 15) = sf * uz2 + uz row = row + 1 Next ii
You may find refactored code in attachment.
Tip - be language independent:
RSelection.FromText ALL 'instead of above this should also work Set RSelection = Robapp.Project.Structure.Selections.CreateFull(I_OT_NODE)
Ask if any questions.
Regards,
Marcin
Hi,
i tried that without any success, but Marcin solution works. Thank you both!
So sorry, but I have tried this solution, and the results read by VBA are different from the ones in Robot
On the other hand, the solution done by @marcinrakus does work.
Thanks!