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
13332 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 2 of 61
tony.ridley
in reply to: bjornhgr

You could do it in excel then export the cells to a text file.  If you rename the file as Robot text file (.str), then you can import it.  

 

The text file would probably look like this.................you could automate that easily in excel

 

COMbination # 150 1.2DL + 0.4LL [PLAT] + 1.2LL [EQUIP] + 1.0 WIND [Z]
 ULS
10 1.2 20 0.4 30 1 21 1.2 2 1.2 1 1.2 

COMbination # 160 1.2DL + 0.4LL [PLAT] + 1.2LL [EQUIP] + 1.0 WIND [X]
 ULS
10 1.2 20 0.4 31 1 21 1.2 2 1.2 1 1.2 

 

The API guru's probably know a better way to do it though........ Smiley Happy

 

Message 3 of 61
bjornhgr
in reply to: tony.ridley

Thanks. I'm not sure if we're talking about the same though. You seem to be listing load combinations whereas I'm working on load cases and Robot's "Load Types" dialog box (see image). Is your method still relevant? If so, where do I find the import function for *.str files?

 

Message 4 of 61
tony.ridley
in reply to: bjornhgr

well, the same would apply.

 

I'd save an existing Robot file as .str so you get the format.  Then you can add your load cases......I've used the method a few times

 

eg....

 

LOAds

CASe # 1 DEAD LOAD
SELf-weight
	1to30 

CASe # 2 SDL

 etc etc

 

Then you can insert.....

 

Document1.jpg

 

Message 5 of 61
Rafal.Gaweda
in reply to: bjornhgr

Bjorn,

 

Some explanations:

 

Using Excell without VBA

- not possible to create simple case by ordinary copying by clipboard contents of excel file to robot Loads table

 

- possible to add \ modify loads to existing load cases by copying by clipboard (of course cells data \ order should be the same as in robot Loads table \ Edition tab ; keep in mind that some excell cells may need to have cells format Numerical instead of General)

 

loadsfromex.jpg

 

- possible to create combinations this way but without controlling its number ; modification possible

 

combfromexc.jpg

 

Using Excell WITH VBA

- you can do whatever you want if you write small macro

I am attaching simple macro to create (not modify - to do so it is needed to add some code to macro) Simple cases  - Basic tab in attached Excel file

There is another macro on Combinations tab where you can define (not modify - to do so it is needed to add some code to macro) combinations and then generate them in Robot basing on cases from Basic tab. In this file as a default 20 cases can be used , if you need more cases - add more columns and specify correctly data in cells in row 4

 

STR File:

If you want to play with it (NOTE: not all kind of loads are supported by this format for eg panel \ countour loads) :

- syntax described here : "c:\Program Files (x86)\Common Files\Autodesk Shared\Structural\Help\2012\R97mod01.doc"  ;

some str file examples can be found here: c:\ProgramData\Autodesk\Examples\Example.001 



Rafal Gaweda
Message 6 of 61
Rafal.Gaweda
in reply to: Rafal.Gaweda

Small modifications in macros codes to enable modification of existing cases \ combinations.

Excel file attached.



Rafal Gaweda
Message 7 of 61
tony.ridley
in reply to: Rafal.Gaweda

Rafal,

 

As always your spreadsheets are awesome and super helpful.  

 

BUT:  I trialled the combination modification one last night.  I had 20 or so combinations already in my model.  There is no button on the spreadsheet to import to excel the EXISTING cases / combinations.  So I cut and paste instead.

 

Then I change some factor definitions etc, then hit the button to update my Robot file.  The Combinations went completely crazy.  Some combinations that only had 3 cases ended up with 5 or 6.  

 

So, being too lazy / inept / bad at code to modify your sheet by myself (Smiley Sad), is there any chance it could be updated to;

  1. Allow dumping the existing cases / combinations into Excel,
  2. Fix the minor bug experienced when reimporting.

I know you just sit there all day with nothing to do anyway, waiting to write VBA for me...............Smiley Very Happy

 

Tony

Message 8 of 61
bjornhgr
in reply to: bjornhgr

Thank you for your replies! I haven't had the time to try your solutions yet, as my project stopped, but I'll give it a go as soons as I have the chance. I really appreciate this forum an all of its helpful users! Awesome stuff!

Message 9 of 61
Rafal.Gaweda
in reply to: tony.ridley


 Tony,

 

Then I change some factor definitions etc, then hit the button to update my Robot file.  The Combinations went completely crazy.  Some combinations that only had 3 cases ended up with 5 or 6.  

 

You can not copy easyly combinations from Robot. Take a look at cells order in robot Combinations table:

casenumber ; coeff; casenumber ; coeff....

 

In Excel : cases are "columns" so in cells of combination rows you need only coeffs in proper columns.


I know you just sit there all day with nothing to do anyway, waiting to write VBA for me...............Smiley Very Happy

 

Send me beer-pack 😉  firts

 



Rafal Gaweda
Message 10 of 61
Rafal.Gaweda
in reply to: Rafal.Gaweda

Gift for You 😉 attached.



Rafal Gaweda
Message 11 of 61
tony.ridley
in reply to: Rafal.Gaweda

Rafal,

 

Whats your address for the courier with the case of beer?

 

Cheers,

Tony

Message 12 of 61
Rafal.Gaweda
in reply to: tony.ridley

Small update in attached file.

Possibility to make nested combinations. 
Limitation: max 23 simple cases can be used; But of course xls and macro can be modified to handle more. Have fun :-)There are just 26 columns for combinations in sheet but if you want more just create columns like precedent ones (contents of row 3 and 4) - no modification of macro is required in this case.



Rafal Gaweda
Message 13 of 61
Romanich
in reply to: Rafal.Gaweda

Dear Rafal,

If I understand correctly, for now we can't read/write Subnature type via API. Maybe I'm wrong?

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


Message 14 of 61
Rafal.Gaweda
in reply to: Romanich

 we can't read/write Subnature type via API.

 

We can read it by   .NatureName

Unfortunately we can not set subnature by API.



Rafal Gaweda
Message 15 of 61
Romanich
in reply to: Rafal.Gaweda

Unfortunately we can not set subnature by API.

 

Could you create Development Request for this issue please? Because this is a very need for work with Revit+Robot. 

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


Message 16 of 61
Rafal.Gaweda
in reply to: Romanich

My mistake - it is possble:

 

SetNatureExt (_rgl_action : long)



Rafal Gaweda
Message 17 of 61
Rafal.Gaweda
in reply to: Rafal.Gaweda

Updated xls with subnatures

 

 



Rafal Gaweda
Tags (1)
Message 18 of 61
jo2ny
in reply to: Rafal.Gaweda

This xls file is candy! Very nice!

 

But greed makes me wonder if there is some kind of excel like this that can generate also combinations.

I usualy have the same loads & combinations (fewer than the automatic generator makes). I could edit them in excel once, and use them whenever i need in the future.

 

So my question was, is there a tool for doing this (generation of loads and comb form excel) ?

 

Thanks,

Message 19 of 61
jo2ny
in reply to: jo2ny

FOUND IT!

Never mind previous post! Smiley Embarassed

Message 20 of 61
Rafal.Gaweda
in reply to: jo2ny

Second tab of this macro 🙂


Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report