@Anonymous_Adsk wrote:
for selection of fes and nodes attached
Hi it doesn't work I think. Can we enter a list of nodes in a excel cell and have the results of the selection ?
No it works on nodes selection and FEs selection made in Robot
I tried to modify the macro to be able to enter the number of selection in cell(9.2) but it doesn't work.
My goal is not have to interact with the model.
Only pilot in excell :
Dim obj As RobotObjObject
Dim FECollection As RobotFiniteElementCollection
Dim FEs As String
Dim NodesSel As String
Dim NodeSelection As RobotSelection
Dim NodeCollection As RobotNodeCollection
Set RSelection = RobApp.Project.Structure.Selections.Create(I_OT_FINITE_ELEMENT)
Set NodesSelection = RobApp.Project.Structure.Selections.Create(I_OT_NODE)
RSelection.FromText ""
NodesSelection.FromText " "
For jj = 1 To PanelCol.Count
Set obj = RobApp.Project.Structure.Objects.Get(PanelCol.Get(jj).Number)
FEs = obj.FiniteElems
NodeSel = obj.Nodes
RSelection.AddText (FEs)
NodesSelection.AddText (NodeSel)
Next jj
Set RSelection = RobApp.Project.Structure.Selections.Create(I_OT_FINITE_ELEMENT)
If (OptionButton1.Value) Then
Set RSelection = RobApp.Project.Structure.Selections.Get(I_OT_FINITE_ELEMENT)
If (RSelection.Count = 0) Then
MsgBox "FEs not selected", vbOKOnly, "ERROR"
RobApp.Interactive = True
Exit Sub
End If
End If
If (OptionButton2.Value) Then
Set NodesSelection = RobApp.Project.Structure.Selections.Get(I_OT_NODE)
num_node = Cells(9, 2)
If num_node <> "" Then
NodesSelection.FromText num_node
Set NodesSelection = RobApp.Project.Structure.Nodes.GetMany(NodesSelection)
Else
If (NodesSelection.Count = 0) Then
MsgBox "Nodes not selected", vbOKOnly, "ERROR"
RobApp.Interactive = True
Set NodesSelection = Nothing
Exit Sub
End If
End If
End If
Set FECollection = RobApp.Project.Structure.FiniteElems.GetMany(RSelection)
Set NodeCollection = RobApp.Project.Structure.Nodes.GetMany(NodesSelection)
I just want to choose nodes and cases in excell.
Can you modify the macro for it ?