zospy.functions.lde.find_surface_by_comment#
- zospy.functions.lde.find_surface_by_comment(lde: ZOSAPI.Editors.LDE, comment: str, case_sensitive: bool = True) list[_ZOSAPI.Editors.LDE.ILDERow] #
Returns a list of surfaces from the LDE that have the supplied string as Comment.
In case of multiple matches, the surfaces are returned in ascending order.
- Parameters:
- lde: ZOSAPI.Editors.LDE
The Lens Data Editor (LDE)
- comment: str
String that is searched for in the Comment column of the LDE.
- case_sensitive: bool
Flag that specifies whether the search is case-sensitive or not. Defaults to True.
- Returns:
- list[ZOSAPI.Editors.LDE.ILDERow]
A list of surfaces in the LDE that have a Comment column value which matches the supplied comment argument.
Examples
>>> import zospy as zp >>> zos = zp.ZOS() >>> zos.wakeup() >>> zos.connect_as_extension() >>> oss = zos.get_primary_system() >>> newobj1 = oss.LDE.GetSurfaceAt(0) >>> newobj1.Comment = 'aa' >>> newobj2 = oss.LDE.GetSurfaceAt(1) >>> newobj2.Comment = 'bb' >>> newobj3 = oss.LDE.GetSurfaceAt(2) >>> newobj3.Comment = 'aA' >>> zp.functions.lde.find_surface_by_comment(oss.LDE, 'aa')