Hey
Is it possible to extract the numbers of all nodes from a model ? Basically I want to extract the Node table from Robot into an excel spreadsheet incl. numbers and coordinates, support conditions are not important right now. How would the code look like in VBA?
I have the macro that extract and modify the coordinates of the model, but I need the nodes and their coord. together.
Thanks in advance
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Sorry for the comfusion. I just want to extract the Node table from a ROBOT model to excel via a code in VBA.
Dim NodeCol As RobotNodeCollection Set NodeCol = RobApp.Project.Structure.Nodes.GetAll Dim RNode As RobotNode For ii = 1 To NodeCol.Count Cells(Row, 1) = "Node" Set RNode = NodeCol.Get(ii) Cells(Row, 2) = RNode.Number Cells(Row, 4) = RNode.X Cells(Row, 5) = RNode.Y Cells(Row, 6) = RNode.Z Row = Row + 1 Next ii
Hi, I was just looking to extract node table for selected panels only. Can anyone guide me to get it for perticular panels.
Thanks in advance.
Example (panel selection should be made in Robot)
Dim PanelSel As RobotSelection Set PanelSel = RobApp.Project.Structure.Selections.Get(I_OT_PANEL) Dim Panel As RobotObjObject Dim PanelCol As RobotObjObjectCollection Set PanelCol = RobApp.Project.Structure.Objects.GetMany(PanelSel) Dim NodesSelection As String NodesSelection = "" For i = 1 To PanelCol.Count Set Panel = PanelCol.Get(i) NodesSelection = NodesSelection + " " + Panel.Nodes Next i Dim NodeSel As RobotSelection Set NodeSel = RobApp.Project.Structure.Selections.Create(I_OT_NODE) NodeSel.FromText NodesSelection Dim NodeCol As RobotNodeCollection Set NodeCol = RobApp.Project.Structure.Nodes.GetMany(NodeSel) Dim RNode As RobotNode Row = 10 For ii = 1 To NodeCol.Count Cells(Row, 1) = "Node" Set RNode = NodeCol.Get(ii) Cells(Row, 2) = RNode.Number Cells(Row, 4) = RNode.X Cells(Row, 5) = RNode.Y Cells(Row, 6) = RNode.Z Row = Row + 1 Next ii