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]#
Retrieve surfaces from the Lens Data Editor that have the supplied string as Comment.
In case of multiple matches, the surfaces are returned in ascending order.
- Parameters:
- ldeZOSAPI.Editors.LDE
The Lens Data Editor (LDE)
- commentstr
String that is searched for in the Comment column of the LDE.
- case_sensitivebool
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() >>> oss = zos.connect() >>> lde_object_1 = oss.LDE.GetSurfaceAt(0) >>> lde_object_1.Comment = "aa" >>> lde_object_2 = oss.LDE.GetSurfaceAt(1) >>> lde_object_2.Comment = "bb" >>> lde_object_3 = oss.LDE.GetSurfaceAt(2) >>> lde_object_3.Comment = "aA" >>> zp.functions.lde.find_surface_by_comment(oss.LDE, "aa")