Robot Structural Analysis 2025 /table Load / API

Robot Structural Analysis 2025 /table Load / API

danielroure2267
Enthusiast Enthusiast
3,829 Views
19 Replies
Message 1 of 20

Robot Structural Analysis 2025 /table Load / API

danielroure2267
Enthusiast
Enthusiast

Hello, I noticed that in Robot Structural Analysis 2025, there is now a unique number for load lines:

- Is this number useful for users when using the software?

- Is this number accessible in the API? In the API, there is a unique ID (UniqueID), but it does not correspond to the same number that appears in the table. I would like to know how to access this second unique number via the API.

Thank you.

0 Likes
3,830 Views
19 Replies
Replies (19)
Message 2 of 20

Romanich
Mentor
Mentor
Accepted solution

Hi @danielroure2267,

 

UniqueID is an internal identifier and row numbers in the table is just a row numbers.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.

Roman Zhelezniak

Robot Evangelist & Passionate Civil Structural Engineer

LinkedIn | Robot & Хобот | App Store for Robot
EESignature


0 Likes
Message 3 of 20

danielroure2267
Enthusiast
Enthusiast

Okay, but can this line number be retrieved via the API? Or is it linked to the Unique ID?

0 Likes
Message 4 of 20

Stephane.kapetanovic
Mentor
Mentor

HI @danielroure2267 

See : https://forums.autodesk.com/t5/robot-structural-analysis-forum/get-envelope-forces-bar-via-api-c/m-p...

other identifiers exist : Label, LoadRecord, CodeCombination, CaseCombination, Case, .... See Robot API 20xx.pdf in the ..\SDK directory

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes
Message 5 of 20

danielroure2267
Enthusiast
Enthusiast

Yes, I am familiar with this PDF file, but I cannot find the information about the line numbers that appear in the load tables. The link provides the UniqueID for the bars and nodes, but I am looking for the line number in the load table. Is it possible to obtain this information via the API?

0 Likes
Message 6 of 20

Stephane.kapetanovic
Mentor
Mentor

As @Romanich  explains:

The image ...140456.png simply represents the internal numbering of the rows in the Excel-style table.

The image ...140820.png represents an internal identifier. In this case, the read-only unique identifier assigned to each load record. To determine what type of object has a unique identifier, refer to the PDF file.

It seems that you're trying to identify your load records. You won’t find any direct correlation between the user-defined order of appearance in the table and the internal UniqueID values. This is a common issue that may require *MatchScore*-type classification using enhanced comparable classes and/or editable properties such as UserID or Description. Topics not directly related to the API are not documented on the forum. You’re on your own here.

Python doesn’t have formal interfaces like IComparable or IEquatable in C#. However, it provides equivalent mechanisms through its special (magic) methods.

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
Message 7 of 20

danielroure2267
Enthusiast
Enthusiast
Hello,
If I understand correctly:
The variable corresponding to the line number in the load table is not accessible via the API.
There is no link between this line number and the UniqueID of the load lines accessible in the API.
Do you know if it is possible to link these two pieces of information?

Best regards, thank you.


0 Likes
Message 8 of 20

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @danielroure2267 

As explained in PM, it’s not easy to give you proper advice since you haven’t described the data usage cycle.

The answer to your question (Do you know if it is possible to link these two pieces of information?) is probably already in my previous reply: either use a match score and/or rely on one of the UserID or Description properties, the latter allows interaction both in the table and through the API.

 

This code allows you to retrieve the UniqueID information from the table. It is also possible to reverse the process to extract a number contained in the text.

After running the macro, open the load table or update the table values by right-clicking.

Python

import win32com.client

def FlashLoadRecordDescription():
    structure = win32com.client.Dispatch("Robot.Application").Project.Structure
    cases = structure.Cases.GetMany(structure.Selections.CreatePredefined(2))
    for i in range(1, cases.Count + 1):
        cas = cases.Get(i) 
        if cas.Type != 0 or cas.AnalizeType == 11: continue
        records = cas.Records
        for j in range(1, records.Count + 1):
            rec = records.Get(j) 
            rec.Description = f"UniqueID: {rec.UniqueId}".rstrip()

if __name__ == "__main__": FlashLoadRecordDescription()

C#

using static RobotOM.IRobotCaseType;
using static RobotOM.IRobotCaseAnalizeType;
using static RobotOM.IRobotPredefinedSelection;
public static void FlashLoadRecordDescription() {
    var structure = new RobotApplication().Project.Structure;
    var cases = structure.Cases.GetMany(structure.Selections.CreatePredefined(I_PS_CASE_SIMPLE_CASES));
    for (int i = 1; i <= cases.Count; i++) { IRobotCase cas = cases.Get(i);
        if (cas.Type != I_CT_SIMPLE || cas.AnalizeType == I_CAT_DYNAMIC_MODAL) continue;
        var records = ((RobotSimpleCase)cas).Records;
        for (int j = 1; j <= records.Count; j++) {
            if (((IRobotLoadRecordCommon)records.Get(j)).IsAutoGenerated) continue;
            dynamic rec = records.Get(j); rec.Description = $"UniqueID: {rec.UniqueId}";
        }
    }
}

VBA

Sub FlashLoadRecordDescription()
  Dim Cas As IRobotCase, SimpleCas As RobotSimpleCase
  Dim commonRec As IRobotLoadRecordCommon, rec As IRobotLoadRecord
  With New RobotApplication
    With .Project.Structure
      With .Cases.GetMany(.Selections.CreatePredefined(I_PS_CASE_SIMPLE_CASES))
        For i = 1 To .Count: Set Cas = .Get(i)
          If Cas.AnalizeType <> I_CAT_DYNAMIC_MODAL And Cas.Type = I_CT_SIMPLE Then
            Set SimpleCas = Cas
            With SimpleCas.Records
              For j = 1 To .Count: Set commonRec = .Get(j)
                If Not commonRec.IsAutoGenerated Then
                   Set rec = .Get(j): rec.Description = "UniqueID :" & rec.UniqueID
                End If
              Next j
            End With
          End If
        Next i
      End With
    End With
  End With
End Sub

Stephanekapetanovic_1-1762425311064.png

Best Regards

updated

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
Message 9 of 20

danielroure2267
Enthusiast
Enthusiast

Hello, I am trying to link the lines in the load table in the "text editing" tab, where I have comments and where I can enter calculations, with the "editing table" that is accessible via the API. I thought I could do this using the line numbers, but they are not accessible. When you write a memo in the text editing table, it is not found in the load table: see screenshot. I have not been able to find a way to retrieve the line from the text editing table directly via the API (screenshot 1). Best regards.

 

0 Likes
Message 10 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @danielroure2267 

Go to the Table Edition tab, the memo field (blue) corresponds to the Description property from RobotLoadRecord in the API

Stephanekapetanovic_2-1763375297978.png

Go to the Values tab, right-click on the table, select Table Columns from the context menu, check the Memo Field option in the dialog box, and then click OK.

Stephanekapetanovic_1-1763375275037.png

The Memo field cannot be added from the Text Edition tab.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes
Message 11 of 20

danielroure2267
Enthusiast
Enthusiast

My information (as shown in my screenshots before) is in the "Text edition" tab, and I want to retrieve it to put it in a memo in "Table edition"

 

In the Python module proposed above, the program has a bug on the lines load "(EF) planar on contour" :

 
Exception has occurred: com_error
(-2147352573, 'Membre introuvable.', None, None)
File "C:\test.py", line 61, in FlashLoadRecordDescription rec.Description = f"UniqueID: {rec.UniqueId} {rec.Description or ''}".rstrip() File "C:\test.py", line 96, in <module> if __name__ == "__main__": FlashLoadRecordDescription() pywintypes.com_error: (-2147352573, 'Membre introuvable.', None, None)

 

Do you know why? Thanks

0 Likes
Message 12 of 20

danielroure2267
Enthusiast
Enthusiast

You've given me an idea; is it possible to retrieve the central column of the "Value" tab via the API, which would allow me to make the connection?

 

 

0 Likes
Message 13 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @danielroure2267 

Your topic would be more educational and useful to the forum if it were created using the Table Edition tab, which does not include the extra text customizations found in the Text Edition tab and already provides all the fields needed to configure standard load records.

It would also have been helpful if you had clarified your project, for example by posting a code snippet and describing your data usage cycle, especially since Python behaves quite differently from VBA or C# due to its type system and the way it handles COM objects. VB and C# being the languages ​​most commonly used here, as mentioned in PM.

I found the project description only in your initial statement of intent and due to your comparisons; the scope has since evolved based on the leads discussed here.

This community thrives on open exchange. The solutions provided here are free and aim to explain concepts, address issues, and help everyone learn. Sometimes this includes unofficial workarounds not found in the official API, shared because they can be useful when no other option exists. It’s also a great place to connect with others professionals who can help you develop your ideas.

Best regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes
Message 14 of 20

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

You've given me an idea; is it possible to retrieve the central column of the "Value" tab via the API, which would allow me to make the connection?

Save it to a CSV file using RobotPrintable 's SaveToFile method, then read it by parsing the CSV entries that contain semicolons. see (API) Macro for dumping all opened tables 

That aside, wouldn't it have been faster to use the API to create your load records? 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
Message 15 of 20

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

In the Python module proposed above, the program has a bug on the lines load "(EF) planar on contour" :

Exception has occurred: com_error
(-2147352573, 'Membre introuvable.', None, None)
File "C:\test.py", line 61, in FlashLoadRecordDescription rec.Description = f"UniqueID: {rec.UniqueId} {rec.Description or ''}".rstrip() File "C:\test.py", line 96, in <module> if __name__ == "__main__": FlashLoadRecordDescription() pywintypes.com_error: (-2147352573, 'Membre introuvable.', None, None)

The error you encountered is not a bug in the code, but a limitation of Robot’s COM type system. The types: IRobotLoadRecordThermalIn3Points, IRobotLoadRecordLinear3D, and IRobotLoadRecordIn3Points do not implement IRobotLoadRecord2, which is the interface that exposes the UniqueId property for the other 21.

These 3 record types inherit only from the IRobotLoadRecord interface, which does not provide UniqueId.

In addition, when using Python via pywin32, CastTo may fail for Robot COM types, even when they technically implement IRobotLoadRecordCommon. This means that filtering of records using IsAutoGenerated cannot be done and all records will be “flashed”. One possible approach could be to use pythonnet to access the .NET COM interfaces, where casting behaves like in C#.

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes
Message 16 of 20

danielroure2267
Enthusiast
Enthusiast

Hello Text Edition, as I mentioned above, allows you to use calculation formulas and add comments, which is useful in cases where loads are complex.

I am attaching my Python code based on your information (thanks again), which allows me to add UniqueID numbers to memos or replace them if they already exist, and to create a manual ID when one does not exist. 

 

0 Likes
Message 17 of 20

danielroure2267
Enthusiast
Enthusiast

Thank you; how can I find this unique number for these loads? Does it have another name? How can I access it? I tried Pythonnet, but it doesn't work. Do you have an example? I used CastTo because it was in the example of see (API) Macro for dumping all opened tables that you gave me.

0 Likes
Message 18 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @danielroure2267 

FYI, you may not have noticed, but I’ve updated the code I posted in message 8.

The provided snippet is a transcript without context or boundaries and does not include the uncovered sections; therefore, I still lack a complete view of what your program does.

I still believe that copy and paste was an interesting and rarely discussed topic.

As there don’t seem to be any further questions, I’ll leave it here.

Thanks for the positive feedback.

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes
Message 19 of 20

danielroure2267
Enthusiast
Enthusiast

Hello, I saw your message 8. If you looked at my code in message 16, you will see that I started from that message. My problem is that there are load lines that do not have an UniqueID, which you will see in my code, since I am trying to give one in this case, but I cannot use it because the record number will not be useful for deletion if I have deleted loads previously. I wrote a code to delete charges from a file where you check the charges and delete them from UniqueID except for ManiID; attached; the purpose of my code is to be able to add, modify, and delete charges from the text editing table (see also message 9). Best regards
*** Translated with www.DeepL.com/Translator (free version) ***

 

0 Likes
Message 20 of 20

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @danielroure2267 

I still don't understand what you're expecting here. Each reply expands the request, but the scope is never set.

I would like to remind you that you have not explained what your program does, nor the lifecycle of your data. This would allow us to get straight to the point.

I have reviewed both of your files and I suggest that you look again at the code snippet from message 8, which has been updated. It no longer uses the IRoboLoadRecord2 cast, and it allows you to retrieve a dynamic value and access the UniqueId field for all load types (C#, VB, Python).

Furthermore, a record can only be deleted based on its position in the list, as with the Get method: Get(i) ⇒ Delete(i). Therefore, the loop must be executed in reverse order, deleting the last element first. (§ Robot API: Delete load records within load case )

Since I don’t see why forum users should be involved in debugging, I will not continue this discussion publicly. If you encounter further difficulties, I sometimes respond privately in French/English. Feel free to create a new topic if you have other questions.

  • Copy-paste automation is not part of the documented Autodesk Robot API. However, RobotWindow has a handle and a SendMessage method. Windows libraries can access it by its full RobotTable name, including application name and version. Alternatively, for reading only: see (API) which allows exporting all open tables in Robot (with all tabs) to Excel
  • Load tables represent a user-customizable view, with columns that can be reordered. To reliably correlate data between access methods, each load record includes a readonly UniqueId, which can be stored in the user-accessible Description field (§ 8). Since each load record is unique in its properties, a hash code may be sufficient.
  • Although the RobotWindow handle does not match a Windows handle, it is required to activate table tabs and still useful for identification as the table name can change.
  • The IRobotTableType property is not accessible from RobotTable, only the order in which the columns appear or the table tab name with its index can be used to determine the corresponding IRobotTableDataType. This may involve processing data according to the table configuration, taking into account the packet size.
  • Windows keyboard emulation, the system clipboard and Robot event handling operate asynchronously. Therefore, it is recommended to use this way only if you understand how sequences interact and can adapt it to your hardware and projects. (here an approach using C# and an unlocked VBA test project to create combinations using data pasting)
  • A fast user copy-paste action does not imply that a program can perform the same operation faster. For certain tables, timing, window focus, identification needs, and loop constraints make automated copy-paste both slower and less reliable than using the API. Also note that the writing speed slows down as the table grows.
  • For load tables, it’s best to keep the total number of load records to copy under 1,500 rows and to process them in batches of no more than 150 rows—50 to 75 rows in particular if you plan to add formatting logic to fit the text-editing tab in write mode (even if it lets you define points or an outline) and if you intend to read from the values tab.

For the forum, this topic is now closed.

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
EESignature
0 Likes