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: 

VBA Excel macro for any object geometry modifications (API)

63 REPLIES 63
SOLVED
Reply
Message 1 of 64
Rafal.Gaweda
19624 Views, 63 Replies

VBA Excel macro for any object geometry modifications (API)

Hi

 

For those who might be interested I am attaching xls file with macro for objects geometry modifications.

One button to import geometry (characteriscic points coordinates) of selected objects (lines, polylines, arc, circles, panels), second - to update their geometry basing on data in Excell.

NOTE: modify only cells with coordinates.



Rafal Gaweda
63 REPLIES 63
Message 21 of 64
Anonymous
in reply to: Rafal.Gaweda

Is it possible to export through this add-in the thickness as well?

Message 22 of 64
Rafal.Gaweda
in reply to: Anonymous

Sure.

Attached.



Rafal Gaweda
Message 23 of 64
Anonymous
in reply to: Rafal.Gaweda

Thank Rafal!

But I didn't understand in which cell I can change the thickness!

Image 5.jpg

Message 24 of 64
Rafal.Gaweda
in reply to: Anonymous

Column C if you are using objects_geometry_with_rounding_5.xlsm 

 

columnc.jpg



Rafal Gaweda
Message 25 of 64
Anonymous
in reply to: Rafal.Gaweda

OK, but what if...I want to have my own thickness and instead of creating it in a software I put it in an excel. Is it possible to load that thickness(defined in an excel sheet) to the software whether I always must create corresponding one in the software?

 

Message 26 of 64
Rafal.Gaweda
in reply to: Anonymous

Sure it is.

You have to add \ write such code.



Rafal Gaweda
Message 27 of 64
Anonymous
in reply to: Rafal.Gaweda

Could do you it for me, please? I'm no able to write a code.

Message 28 of 64
Rafal.Gaweda
in reply to: Anonymous

Have fun.

Attached



Rafal Gaweda
Message 29 of 64
m.ridi220
in reply to: Rafal.Gaweda

Hi @Rafal.Gaweda is it possible to get dimensions from a bar? I 'm missing that code! 

Can you help me please?

Thank you so much!

Message 30 of 64
Rafal.Gaweda
in reply to: m.ridi220

Hi @m.ridi220

 

My understanding is : Bar dimension = bar length

Bar length is calculated as distance between bar start node and endnode.

If you want to change bar length you have to move node(s).

See this addin.



Rafal Gaweda
Message 31 of 64
m.ridi220
in reply to: Rafal.Gaweda

My bad @Rafal.Gaweda, for dimensions I mean B (base) and H (height) of the concrete section

Message 32 of 64
Rafal.Gaweda
in reply to: m.ridi220

 

My bad @Rafal.Gaweda, for dimensions I mean B (base) and H (height) of the concrete section

 

 

Do you mean RC cross section dimensions?

Example here.



Rafal Gaweda
Message 33 of 64
m.ridi220
in reply to: Rafal.Gaweda

@Rafal.Gaweda Importing into excel both dimensions B and H from a RC section in Robot

Message 34 of 64
Rafal.Gaweda
in reply to: m.ridi220

Hi @m.ridi220

Importing into excel both dimensions B and H from a RC section in Robot


Look at the example I pointed you.

Instead of ...SetValue use ...GetValue



Rafal Gaweda
Message 35 of 64
mike.kovacs
in reply to: Rafal.Gaweda

What a long-standing forum! The add-in has clearly withstood the test of time...

 

Anyways, you can see in the screenshot that only 5 of hte nodes updated. This is because I added two intermediate points in the definition of hte panel, and I suspect the add-in doesn't support the addition of points -- it will only update the existing points.

 

Can you confirm I understand that correctly, or if there is in fact a way to add intermediate points to the definition of a panel with this add-in?

 

Thanks

Adding points in panel definition.png

Message 36 of 64
Rafal.Gaweda
in reply to: mike.kovacs

Hi @mike.kovacs

 

 I suspect the add-in doesn't support the addition of points -- it will only update the existing points.

 

Exactly.

 



Rafal Gaweda
Message 37 of 64
mike.kovacs
in reply to: Rafal.Gaweda

Thanks Rafal. IF I was better at programming, I'd add that feature. I was easily able to copy the coordinates in the Excel table, into the Robot coordinates table for the definition of this panel -- so it wasn't hopeless.

 

 

Message 38 of 64
m.ridi220
in reply to: Rafal.Gaweda

Hi @Rafal.Gaweda I did:

 

Set RLabel = RobApp.Project.Structure.Labels.Create(I_LT_BAR_SECTION, LabelName)
Set RBSD = RLabel.Data
    RBSD.ShapeType = I_BSST_CONCR_BEAM
    Set RBSCRD = RBSD.Concrete
    RBSCRD.GetValue I_BSCDV_BEAM_B, (Cells(Row, 10).Value)

but i get the following error:

"Wrong number of arguments or invalid property assignment"

Message 39 of 64
Rafal.Gaweda
in reply to: m.ridi220

Hi @m.ridi220

 

My understanding is you want to GET it so example below:

 

Dim RLabel As RobotLabel
Dim RBSD As RobotBarSectionData
Dim RBSCRD As RobotBarSectionConcreteData

Set RLabel = RobApp.Project.Structure.Labels.Get(I_LT_BAR_SECTION, "B 30x50")
Set RBSD = RLabel.Data
Set RBSCRD = RBSD.Concrete
Cells(1, 10) = RBSCRD.GetValue(I_BSCDV_BEAM_B)


Rafal Gaweda
Message 40 of 64
m.ridi220
in reply to: Rafal.Gaweda

My bad @Rafal.Gaweda, what I mean is to get for a generic beam both base and height dimensions from robot into excel.

In your example I think is for a specific beam "B 30x50"

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

Post to forums  

Autodesk Design & Make Report