Beam module vba

Beam module vba

Anonymous
Not applicable
956 Views
10 Replies
Message 1 of 11

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
Accepted solutions (3)
957 Views
10 Replies
Replies (10)
Message 2 of 11

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
Message 3 of 11

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
Message 4 of 11

Anonymous
Not applicable
Accepted solution

thank you your code is already complete.

0 Likes
Message 5 of 11

Anonymous
Not applicable

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

0 Likes
Message 6 of 11

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
Message 7 of 11

Anonymous
Not applicable

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

0 Likes
Message 8 of 11

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
Message 9 of 11

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
Message 10 of 11

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
Message 11 of 11

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

So it means it is not implemented in API.



Rafal Gaweda
0 Likes