hi @a54249
you can select from nodes of panels and filter by coordinates on this more restricted list.
After that, yes, it is possible to do it by API. Here is a commonly used generic method
Sub SelectNodesByCoordinatesRanges()
Dim RobApp As RobotApplication: Set RobApp = New RobotApplication
Dim NodCol As IRobotCollection, NodSel As RobotSelection
With RobApp.Project.Structure
Set NodCol = .Nodes.GetAll
Set NodSel = .Selections.Get(I_OT_NODE)
End With
Dim bounds As Variant: bounds = [Limits].Value2
XMin = bounds(1, 1): Xmax = bounds(1, 2)
YMin = bounds(2, 1): Ymax = bounds(2, 2)
ZMin = bounds(3, 1): Zmax = bounds(3, 2)
For i = 1 To NodCol.Count
With NodCol.Get(i)
If WithIn(.X, XMin, Xmax) And WithIn(.Y, YMin, Ymax) And WithIn(.Z, ZMin, Zmax) Then Txt = Txt & " " & .Number
End With
Next
NodSel.FromText Txt
Set RobApp = Nothing
End Sub
Function WithIn(V, VMin, VMax) As Boolean
WithIn = V > VMin And V < VMax
End Function
Best Regards
Stéphane Kapetanovic
Did you find this post helpful? If it gave you one or more solutions,
don't forget to click the Accept Solution button and leave a < like !
