Quantcast
Channel: RAM | STAAD Forum - Recent Threads
Viewing all articles
Browse latest Browse all 23543

RE: Macro for renumbering nodes / beams / plates

$
0
0

You can directly renumber the entities within Staad by the RENUMBER option. see below.

However, if you want a MACRO by which you can instruct to renumber any particular entity then there is no such direct Open-Staad Function available which can RENUMBER or REPLACE the entity number. However, you can indirectly renumber any specific entity like node, beam, plate by first deleting the target entity and then create a new entity at the same location with a new numbering.

But there are several limitations. For example when you are deleting a node and then again creating new node then the connected members and its properties , the imposed loading etc get deleted. So, it is a very uphill task to again re-create the deleted beams and then assign different specification and loading.

The following VBA code may  help in renumbering a particular node.

=========================================================================

Dim objOpenSTAAD As Object

Dim NodeNo As Long

Dim a As Long

Dim b As Long

Dim MemberNo As Long

Dim NodeA As Long

Dim NodeB As Long

Dim CoordX As Double

Dim CoordY As Double

Dim CoordZ As Double

Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

a = Application.InputBox(prompt:="enter the target node", Type:=3)

b = Application.InputBox(prompt:="enter the renumbered node", Type:=3)

NodeNo = a

 objOpenSTAAD.Geometry.GetNodeCoordinates NodeNo, CoordX, CoordY, CoordZ

objOpenSTAAD.Geometry.DeleteNode NodeNo

objOpenSTAAD.Geometry.CreateNode b, CoordX, CoordY, CoordZ

End Sub

=============================================================

The .xlsm file is attached herewith.

Using the same approach you can renumber a member and a plate.

(Please visit the site to view this file)


Viewing all articles
Browse latest Browse all 23543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>