Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Beam module vba

Anonymous

Beam module vba

Anonymous
Not applicable
Hello,
Is it possible to add a beam directly into the beam module using vba?
By changing its dimensions of the beam by vba. Thank you for your help
0 Likes
Reply
Accepted solutions (3)
856 Views
10 Replies
Replies (10)

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

Hi @Anonymous

 

If I understood Your correctly, it can be done.

See example code below.

 

Dim Robapp As New RobotApplication

Dim RC As RobotProjectComponent

Set RC = Robapp.Project.ComponentMngr.Create(I_PCT_BEAM, "B1", "1")
Dim IRCB As IRConcrBeam
Set IRCB = RC.Data
IRCB.Geometry.SpanNumber = 2

Dim IBS As IRConcrBeamSegment

Set IBS = IRCB.Geometry.Span(1).segment(1)
IBS.Dim(I_BSD_BEAM_SECTION_DIM_H1) = 1
IBS.Dim(I_BSD_BEAM_SECTION_DIM_B) = 0.5

Set IBS = IRCB.Geometry.Span(2).segment(1)
IBS.Dim(I_BSD_BEAM_SECTION_DIM_H1) = 1
IBS.Dim(I_BSD_BEAM_SECTION_DIM_B) = 0.5

 

 



Rafal Gaweda
0 Likes

Anonymous
Not applicable

thank you very much it works!

 

is it possible to change the standard name of the beam P1, P2 ... in VBA?

0 Likes

Anonymous
Not applicable
Accepted solution

thank you your code is already complete.

0 Likes

Anonymous
Not applicable

can you give an example to load the beam in the module beam in vba? thank you

0 Likes

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

HI @Anonymous

 

Example code

 

......
IRCB.Geometry.SpanNumber = 2

IRCB.LinearLoadsCount = 1
IRCB.LinearLoad(1).Case = 1
IRCB.LinearLoad(1).Nature = I_BLN_BEAM_NATURE_DEAD
IRCB.LinearLoad(1).Spans.Add 1
IRCB.LinearLoad(1).Spans.Add 2
IRCB.LinearLoad(1).Value1 = 1000

Dim IBS As IRConcrBeamSegment
......


Rafal Gaweda
0 Likes

Anonymous
Not applicable

Thank you very much it works perfectly. you master very well the engineering. i am satisfied.

0 Likes

Anonymous
Not applicable

Photo.pngPhoto1.pngHello Mr. Rafal trying to customize the VBA code above I have not found a possibility to call in VBA for some buttons in images attached. Is it possible to do that in VBA? Thank you very much for helping me with an example.

0 Likes

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

Everything what is available by API you can find expanding IRCB in my code



Rafal Gaweda
0 Likes

Anonymous
Not applicable
Hello Mr Rafal, yes I have already searched through your code. But it seems to be impossible to use the control buttons to frame in red on the image above in vba? Is there a vba guide for robot? thank you
0 Likes

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

So it means it is not implemented in API.



Rafal Gaweda
0 Likes

Type a product name