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: 

API Help - Bar lenght and Other

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
RRufino
720 Views, 18 Replies

API Help - Bar lenght and Other

Hi all,

 

I was trying to adapt some macros that some users gently post here on Discussion Groups.

 

I already made a part of what i wanted...but this is the first time i'm trying to use macros, so i'm not being able to do the rest.

 

I have already a way to have all forces on my xls file, but i want to get in the following columns Lenght(m) | Section | Rect_BF | Rect_HT | Rect_EP | Bar Name | Deflection (mm)

 

How can i do this? Can you help me?

 

Thanks, please see attachement

18 REPLIES 18
Message 2 of 19
Rafal.Gaweda
in reply to: RRufino

Example code:

The sectional data \ interface \ access depends of section type: from database or user or tappered or complex ....

What sections do you have?

 

Dim RobApp As New RobotApplication
Dim Bar As IRobotBar
Dim Sel As IRobotSelection
Dim Sec As RobotBarSection
Dim BarCol As RobotBarCollection
Dim sectData As IRobotBarSectionData



Set Sel = RobApp.Project.Structure.Selections.Get(I_OT_BAR)
Set BarCol = RobApp.Project.Structure.Bars.GetMany(Sel)

For i = 1 To BarCol.Count
    
    Set Bar = BarCol.Get(i)
    Set sectLab = Bar.GetLabel(I_LT_BAR_SECTION)
    Set sectData = sectLab.Data

    Set Sec = Bar.GetLabel(I_LT_BAR_SECTION)


    Cells((7 + i), 1) = Bar.Number
    Cells((7 + i), 2) = Bar.Length
    Cells((7 + i), 3) = Sec.Name
    Cells((7 + i), 4) = sectData.GetValue(I_BSDV_AX) ' A of section
    Cells((7 + i), 5) = sectData.GetValue(I_BSDV_D) ' h of section
 
Next i

Exit Sub

 

 



Rafal Gaweda
Message 3 of 19
RRufino
in reply to: Rafal.Gaweda

I have regular Rc Beams and Rc Columns.


I tried to copy that code to "my" macros but it simply not work...where should i paste that?


Thanks in advance

Message 4 of 19
Rafal.Gaweda
in reply to: RRufino

I have regular Rc Beams and Rc Columns.

 

OK , I will show you.


I tried to copy that code to "my" macros but it simply not work...where should i paste that?

 

It was example for steel sections - copy it to separate xls file



Rafal Gaweda
Message 5 of 19
RRufino
in reply to: Rafal.Gaweda

OK , I will show you.

 

Thanks Rafal, if you don't mind please check the attachement on my first post.

 

Message 6 of 19
Rafal.Gaweda
in reply to: RRufino

Take a look at attached xls



Rafal Gaweda
Message 7 of 19
RRufino
in reply to: RRufino

Dear Rafal, i don't know how to thank you!
Thank you so much!

Greetings from Portugal!

 

1000 kudos for you!

Message 8 of 19
FilRib
in reply to: RRufino

Hi Rafal,

 

I'm seeing that this macro is for 2 or more points in a bar.

 

What should i do to extract data only for 1 point? 

 

For example:

 

I want data (forces, section propreties, etc...) for the point x=0 of the bar.

 

Thanks in advance,

 

Cheers!

Message 9 of 19
athurD
in reply to: FilRib

hi.

File excel erro ???????

2012-10-19_1736.png

Message 10 of 19
FilRib
in reply to: athurD

Where is the error?

Message 11 of 19
Rafal.Gaweda
in reply to: FilRib

 

What should i do to extract data only for 1 point? 

I want data (forces, section propreties, etc...) for the point x=0 of the bar.

 

Small modifications and we have a new macro ... attached

 



Rafal Gaweda
Message 12 of 19
FilRib
in reply to: FilRib

Hi again,

 

Other question?

 

The current output is organized by nodes, i.e:

 

BarraCaso
15317
15417
15318
15418
15319
15419
15320
15420

 

What should i do to have this output:

 

BarraCaso
15317
15318
15319
15320
15417
15418
15419
15420

 

Thanks!

Message 13 of 19
Rafal.Gaweda
in reply to: athurD


@Robot_GOOD wrote:

hi.

File excel erro ???????

 


Macros from this thread do not work with selections made  in robot.

Fill correct data in Excel cells or modify macro.



Rafal Gaweda
Message 14 of 19
Rafal.Gaweda
in reply to: FilRib

The current output is organized by nodes, i.e:

 

Barra Caso
1 53 17
1 54 17
     

 

What should i do to have this output:

 

Barra Caso
1 53 17
1 53 18
     
Just one loop should be changed ... file in message 19, below

 



Rafal Gaweda
Message 15 of 19
FilRib
in reply to: Rafal.Gaweda

You are THE MAN! 🙂

 

Very Very Useful !

Message 16 of 19
RRufino
in reply to: FilRib

Hi Rafal, i tested this last file you sent to user FilRib and something is not ok....because that macro puts forces on end node equal to origin node.

Message 17 of 19
Rafal.Gaweda
in reply to: RRufino


Hi Rafal, i tested this last file you sent to user FilRib and something is not ok....because that macro puts forces on end node equal to origin node.


Yep, my mistake.

 



Rafal Gaweda
Message 18 of 19
RRufino
in reply to: Rafal.Gaweda

I think that the successive adaption turned the process too messy.

 

I tried this one and i found that for origin nodes some values are not ok (example: My and Mz), on the other hand if you have more then one combination, forces for end node still remains equal to origin node.

 

Or am i seeing this wrong?

Message 19 of 19
Rafal.Gaweda
in reply to: RRufino

 

Or am i seeing this wrong?


No, you are right. To many modifications.

Check this one.



Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report