API CombinationType modification

API CombinationType modification

piglet0
Observer Observer
1,169 Views
4 Replies
Message 1 of 5

API CombinationType modification

piglet0
Observer
Observer

Hi All,

 

I preparing a script that modifies combination type for selected number of combinations. I have a problem with listing and changing combination type for sls frequent, characteristic etc.

I defined all types of available combinations:

piglet0_0-1763111979442.png

I try to read combination type using following script:

Sub CombTypeList()
        
    Call CreateRobotObject
    Dim rSelection As RobotSelection
    Set rSelection = RobApp.Project.Structure.Selections.CreatePredefined(I_PS_CASE_COMBINATIONS)
    Debug.Print "Selection", rSelection.ToText
    Dim AllObjects As RobotCaseCollection
    Set AllObjects = RobApp.Project.Structure.Cases.GetMany(rSelection)
    
    Dim i As Long
    Dim c As IRobotCase
    For i = 1 To AllObjects.Count
        Set c = AllObjects.Get(i)
        Debug.Print c.combinationType
    Next i
    
End Sub

In the result I got:

Selection      2to8  
 0 
 1 
 2 
 3 
 1 
 1 
 1 

So SLS:CHR, SLS:FRE and SLS:QPR is simplified to SLS 1.

How can I get unique values of those types? API manual mentions for example I_CBT_SLS_EC_FRE = 4 but I have no idea how to read this value.

I would appreciate your help.

Michal

0 Likes
Accepted solutions (1)
1,170 Views
4 Replies
  • API
Replies (4)
Message 2 of 5

Stephane.kapetanovic
Mentor
Mentor

hi @piglet0 

You can find the values ​​of the enumeration IRobotCombinationType on page 429 of the "Robot API 20xx.pdf" available in the \SDK directory.

Stephanekapetanovic_0-1763119804828.png

The CombinationType property is read/write.

Stephanekapetanovic_0-1763122201929.png

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 3 of 5

piglet0
Observer
Observer

@Stephane.kapetanovic thank you for your reply.

I found the table in the API manual, but for some reason I am not able to read those values. 

Instead reading values of 4, 5, 6 I get 1 for all of them.

Can you take a look at the code in my post? I guess I do something wrong there. It could be a lame question because I am new to the use of API.

Thanks, Michal

0 Likes
Message 4 of 5

Stephane.kapetanovic
Mentor
Mentor

Have you selected EN1990 Eurocode standards in the default preferences for design codes?

see also : API - Combination typeNon linear support via APIDifferent manual combination tableCombinations - Definition / Modification dialog

In any case, certain types of combinations are not accessed or edited in the standard way.

This project is currently underway. I’m preparing a post on combinations and will let you know as soon as it’s ready.

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 5

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @piglet0 

Here is a test project applied to generating combinations through direct insertion from the table.
The code addresses two major points:

  • execution time compared with using the API (three times faster),
  • and the ability to customize the parameters : Analysis Type, Combination Type, Case Nature, and SQRT.

In this version, the project is limited to 75  is available for 9000 combinations and unlocked. It will be possible to link it with a table designed for creating combinations based on load cases sorted by number and by nature, similar to the ones that have already been freely shared on the forum.

The properties highlighted in green including combination type ↓ are writable.

Stephanekapetanovic_2-1764315523722.png

For those who want to learn more about the code used and plan to include it in their own projects, you can refer to this page or read the vba code directly.

Best Regards

Updated 11/26/2025 - Rewrite / Modified protection / Packet size 75>500 / Total number of combinations 75>9000

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