The Find Method

The Find method is common to most collection and list objects available via the Multiframe Object Model. 

 

This method takes 3 parameters which identify the property to be

 

Example – Find pinned nodes

 

Dim myNodeList As New Multiframe.NodeList

'Find all pinned nodes
myNodeList.Add mfApp.Frame.Nodes.Find("Pinned", True)
 
Find all nodes with labels starting with ‘abc’
myNodeList.Clear
myNodeList.Add mfApp.Frame.Nodes.Find("Label", "abc*")

 

A slight more sophisticated script is shown below in which all the elements at a particular height are obtained by firstly searching all the elements within a frame to find those with the first end position at the specified height.  The results from this query, stored as an ElementList object, are then searched to find all elements that have their second end positioned at the correct height.  All the elements in the resulting list of elements are then labelled as “Floor 1”.

Dim myElList As New Multiframe.ElementList
 
'Select all elements in first floor which is at y=5.0
Set myElList = myFrame.Elements.Find("y(1)", 4.9, 5.1)
Set myElList = myElList.Find("y(2)", 4.9, 5.1)
myElList.Label = “Floor 1”

’myEllist.Members.Label = “Floor 1”

Find using results

Dim myList As New Multiframe.MemberResultList

'Select all elements in first floor which is at y=5.0
With mfApp.Results.Case()
  Set myList =.Find("y(1)", 4.9, 5.1)
  Set myElList = myElList.Find("y(2)", 4.9, 5.1)
  myElList.Label = “Floor 1”
End with

’myEllist.Members.Label = “Floor 1”