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: 

(API) Extracting node table

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
AIIAK
1307 Views, 6 Replies

(API) Extracting node table

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

 

6 REPLIES 6
Message 2 of 7
Rafal.Gaweda
in reply to: AIIAK

Sorry I do not understand.
You have the macro but want the same macro again in "different way" ?


Rafal Gaweda
Message 3 of 7
AIIAK
in reply to: Rafal.Gaweda

Sorry for the comfusion. I just want to extract the Node table from a ROBOT model to excel via a code in VBA.

Message 4 of 7
Rafal.Gaweda
in reply to: AIIAK

 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


Rafal Gaweda
Message 5 of 7
AIIAK
in reply to: Rafal.Gaweda

Thanks that worked.

Message 6 of 7
harish03cv
in reply to: Rafal.Gaweda

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.

Message 7 of 7
Rafal.Gaweda
in reply to: harish03cv

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


Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report