Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Editing load cases in excel? API?

60 REPLIES 60
SOLVED
Reply
Message 1 of 61
bjornhgr
13522 Views, 60 Replies

Editing load cases in excel? API?

In order to create envelope diagrams, I'm about to create separate load cases for each span of a 30-span bridge and both symmetric and asymmetric loads. Is there a way to edit the load cases i excel, or do I have to create them all in Robot?

 

Thank you!

 

@bjornhgr Artur Kosakowski marked Rafal Gawenda's post as the solution. If it did not work as an answer, please post your reply in this thread so that I can unmark the solution. 

60 REPLIES 60
Message 21 of 61
jack.sanden
in reply to: Rafal.Gaweda

Hi

 

I've recently started using Excel with Robot and I'm really thankful for these small excel-programs you've created Rafal. I am however trying, using your (Rafal's) scripts as models, to modify a program more suited for my needs. One of the things that I can't get to work, when it comes to importing and updating load records, is applying the same load to several bars at ones (I'm creating a program using Uniform loads). The importation to Excel works, but I can't later on update the same cell into Robot. Does anyone have any ideas how to do this?

 

Thankful for answers

 

Best regards

Jack

Message 22 of 61
rsousa_
in reply to: jack.sanden

Have you tried doing this? following variable names from API tutorial...

...

Dim rec As IRobotLoadRecord

 

...

rec.Objects.AddText (Cells(xxx, yyy).Value)

 

At cells(xxx, yyy) you should have all the bars that you want the load to be applied like 1to10 or 2 3 4 7 10...

 

Of course this will add to already aplied bars... if you want only the bars selected in excel, you will have to exclude that objects first. 

Regards

 

Message 23 of 61
Rafal.Gaweda
in reply to: rsousa_

Generally first you have to find out which record to update.
Either but checking objects (.Objects) assigned to such record (compare selections...) or you can store somewhere which excel row corresponds to which record in robot


Rafal Gaweda
Message 24 of 61
1090174
in reply to: Rafal.Gaweda

Hi Rafal,

I have a excel file with your API for extract the internal forces from Robot File, works perfectly! but i want extract a "case name" and "nature" as well. Can you tell me the code for extract thit?

thank you

regards
Message 25 of 61
rsousa_
in reply to: 1090174

have you tried, for example:

 

CaseCol.Get(j).Name
CaseCol.Get(j).Nature

 

of course nature will be 0 - permanent, 1 - exploatation, 2 - wind and so on.

 

Regards

Message 26 of 61
Rafal.Gaweda
in reply to: rsousa_
Message 27 of 61
1090174
in reply to: Rafal.Gaweda

Done! Smiley Very Happy

Thank you both!

regards

Message 28 of 61
mgaafar
in reply to: bjornhgr

Hi,

   I was trying to copy the loads from the loads tab table to excel and edit it and paste it back in to ROBOT.

it seems there is a bug because it does not read back the data properly and mixes cells.

am i doing something wrong or it is a bug?

 

video link:

http://autode.sk/1VqaCVy

http://www.screencast.com/t/wUuzzAf9Dxbv

Tags (2)
Message 29 of 61
Rafal.Gaweda
in reply to: mgaafar



Rafal Gaweda
Message 30 of 61
mgaafar
in reply to: Rafal.Gaweda

Thanks Rafal!!

Message 31 of 61
Grohl
in reply to: mgaafar

This Excel-macro is awesome.

 

Add this if you want to be able to input different SLS-types:

 

    ElseIf ctn = "sls:chr" Or ctn = "SLS:CHR" Then
        CT = I_CBT_SLS_EC_RAR
    ElseIf ctn = "sls:qpr" Or ctn = "SLS:QPR" Then
        CT = I_CBT_SLS_EC_QPR
    ElseIf ctn = "sls:fre" Or ctn = "SLS:FRE" Then
        CT = I_CBT_SLS_EC_FRE
Message 32 of 61
Grohl
in reply to: Grohl

Or maybe something like this is better then you don't have to worry about lower/upper case.

 

 

    If LCase(ctn) = "uls" Then
        CT = I_CBT_ULS
    ElseIf LCase(ctn) = "sls" Then
        CT = I_CBT_SLS
    ElseIf LCase(ctn) = "sls:chr" Then
        CT = I_CBT_SLS_EC_RAR
    ElseIf LCase(ctn) = "sls:qpr" Then
        CT = I_CBT_SLS_EC_QPR
    ElseIf LCase(ctn) = "sls:fre" Then
        CT = I_CBT_SLS_EC_FRE
    ElseIf LCase(ctn) = "acc" Then
        CT = I_CBT_ALS
    End If
Message 33 of 61
SPadID02
in reply to: Grohl

Hi

 

First off thank you for this, the tool is great! And for the standard cases this works perfectly but I can't seem to implement the additional SLS cases.

 

The macro creates all of the cases and I can review the results for the SLS:CHR/FRE/QPR cases and can see them in the Combination Table however the type is blank. The combination interface is also blank so can't change the type manually and the design modules do not recognize them as SLS combinations. Has anyone implemented this successfully?

 

Thanks

 

Section of code below in case there are any obvious errors that I have overlooked

 

    If ctn = "uls" Or ctn = "ULS" Then
        CT = I_CBT_ULS
    ElseIf ctn = "sls" Or ctn = "SLS" Then
        CT = I_CBT_SLS
    ElseIf ctn = "acc" Or ctn = "ACC" Then
        CT = I_CBT_ALS
    ElseIf ctn = "sls:chr" Or ctn = "SLS:CHR" Then
        CT = I_CBT_SLS_EC_RAR
    ElseIf ctn = "sls:fre" Or ctn = "SLS:FRE" Then
        CT = I_CBT_SLS_EC_FRE
    ElseIf ctn = "sls:qpr" Or ctn = "SLS:QPR" Then
        CT = I_CBT_SLS_EC_QPR
    End If
    Dim cmb As IRobotCaseCombination
    
    If loads.Exist(n) Then
        Set cmb = loads.Get(n)
        cmb.name = name
        cmb.CombinationType = CT
    Else
        Set cmb = loads.CreateCombination(n, name, CT, I_CN_EXPLOATATION, I_CAT_COMB)
    End If

 

Message 34 of 61
Rafal.Gaweda
in reply to: SPadID02

Hi @SPadID02

 

Unfortunately due to software issue in ROBOT API implementation is it not possible to get\set:

SLS-CHR
SLS-QPR
SLS-FRE
FIRE

types by API

 

The issue is registered for correction.

 



Rafal Gaweda
Message 35 of 61
SPadID02
in reply to: Rafal.Gaweda

Ah, thought that might be the case. Thank you for confirming Rafal.

 

I look forward to when it is corrected.

Message 36 of 61

Hi

 

Is this excel file limited to 25 basic cases?

I try to use it for a model with 27 basic cases, and on the combinations sheet the last two basic load cases are replaced with the first two "from combinations".

 

Thank you for a (otherwise) great file!

Message 37 of 61

Hi @anton.ahlsten

 

Let's say it is limited to 25 but You can modify it.

1. On Combinations tab, starting from AA column , cells in 3 and 4 row are wrongly filled \ not filled.

Fill it in similar way as in previous columns (let's say till the end of grey cells)

Example for AA column:

a26.jpg

 

2. Open VBA editor (ALT+F11)

and replace 26 by 52 here:

 

52.jpg



Rafal Gaweda
Message 38 of 61

What about the values? The factors from combinations seem to get written to the same cells as before. I'm not very familiar with VBA so I'm not sure what the change in the code was supposed to do.

Message 39 of 61

hi 

@anton.ahlsten

 

Bump



Rafal Gaweda
Message 40 of 61

Yes, I can see the problem now. When I'm using load combinations as basic load cases as well as having 27+ basic load cases, the factors from load combinations get written to the same columns as the last basic load cases.

 

Maybe I'm asking for too much, but do you know any way to make the xls file adaptive to the number of basic load cases imported?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report