The AdvancedFindObj2 method selects object(s) matching the specified criteria. Returns the last object found.
Syntax
object.AdvancedFindObj2( MatchStr, WholeWordOnly, MatchCase, FindAll, ComparePID, CompareSID, CompareAttrib1, CompareAttrib2, CompareHyperlink, FindArea, FindCurve, FindPoint, FindRectangle, FindRoundedRectangle, FindSquare, FindEllipse, FindCircle, FindText, Method )
Parameter |
Type |
Description |
MatchStr |
String |
required; text to search |
WholeWordOnly |
Boolean |
optional; true to match whole words only; default: False |
MatchCase |
Boolean |
optional; true to match case; default: False |
FindAll |
Boolean |
optional; true to find all strings that match the criteria, false to find one string; default: False |
ComparePID |
Boolean |
optional; true to find string in primary IDs; default: True |
CompareSID |
Boolean |
optional; true to find string in secondary IDs; default: False |
CompareAttrib1 |
Boolean |
optional; true to find string in attribute 1; default: False |
CompareAttrib2 |
Boolean |
optional; true to find string in attribute 2; default: False |
CompareHyperlink |
Boolean |
optional; true to find string in hyperlinks; default: False |
FindArea |
Boolean |
optional; true to find areas matching the string; default: True |
FindCurve |
Boolean |
optional; true to find curves matching the string; default: True |
FindPoint |
Boolean |
optional; true to find points matching the string; default: True |
FindRectangle |
Boolean |
optional; true to find rectangles matching the string; default: False |
FindRoundedRectangle |
Boolean |
optional; true to find rounded rectangles matching the string; default: False |
FindSquare |
Boolean |
optional; true to find squares matching the string; default: False |
FindEllipse |
Boolean |
optional; true to find ellipses matching the string; default: False |
FindCircle |
Boolean |
optional; true to find circles matching the string; default: False |
FindText |
Boolean |
optional; true to find text blocks matching the string; default: False |
Method |
optional; search method; default: mvFindExactMatch |
Example
This example searches for an area with an ID of "Oregon".
MapShapes.AdvancedFindObj(MatchStr:="Oregon", WholeWordOnly:=True, MatchCase:=False, FindAll:=False, ComparePID:=True, CompareSID:=True, CompareAttrib1:=True, CompareAttrib2:=True, CompareHyperlink:=True, FindArea:=True, FindCurve:=False, FindPoint:=False, FindRectangle:=False, FindRoundedRectangle:=False, FindSquare:=False, FindEllipse:=False, FindCircle:=False, FindText:=False, Method:=mvFindPhrase)
Used by: Shapes collection