Loop ElementList

This is a sub-procedure to find the element transom.

Example and syntax

procedure CheckProduct_Transom(aWrapper: TSalesLineWrapper);  
Var
  vElementIdx: Integer;
  vElement :TCustomElementWrapper;
begin
  for vElementIdx := 0 to aWrapper.ElementList.Count - 1 do
  begin
    vElement := aWrapper.ElementList.Elements[vElementIdx];
    if  (vElement.ElementKind = EkTransom) then  
    begin
      aWrapper.DesignInfo('Transom is there');
      Break; // Break to end the loop in procedure
    end;
  end;
end;

Last updated

Was this helpful?