DelphiARX 2000i 实体选择

procedure TDArxDocManager.ArxCmdENTSELECT;
var
  pt1, pt2, pt3, pt4:Tads_point;
  pointlist:Presbuf;
  ssname:Tads_name;
begin
  pt1[X] :
=0;
  pt1[Y] :
=0;
  pt1[Z] :
= 0.0;
  pt2[X] :
=0; pt2[Y] := 5.0; pt2[Z] := 0.0;

  
// Get the current PICKFIRST set, if there is one;
  
// otherwise, ask the user for a general entity selection.
  acedSSGet('', nil, nil, nil, ssname);

  
// Get the current PICKFIRST set, if there is one.
  acedSSGet('I', nil, nil, nil, ssname);

  
// Selects the most recently selected objects.
  acedSSGet('P', nil, nil, nil, ssname);
 
  
// Selects the last entity added to the database.
  acedSSGet('L', nil, nil, nil, ssname);
 
  
// Selects entity passing through point (5,5).
  acedSSGet('', @pt2, nil, nil, ssname);

  
// Selects entities inside the window from (0,0) to (5,5).
  acedSSGet('W', @pt1, @pt2, nil, ssname);
 
  
// Selects entities enclosed by the specified polygon.
  pt3[X] := 10.0; pt3[Y] := 5.0; pt3[Z]:= 0.0;
  pt4[X]:
= 5.0; pt4[Y]:=0; pt4[Z]:= 0.0;
  pointlist:
= acutBuildList([RTPOINT, APosToVar(pt1), RTPOINT, APosToVar(pt2),
    RTPOINT, APosToVar(pt3), RTPOINT, APosToVar(pt4), 
0]);
  acedSSGet(
'WP', pointlist, nil, nil, ssname);
 
  
// Selects entities crossing the box from (0,0) to (5,5).
  acedSSGet('C', @pt1, @pt2, nil, ssname);
 
  
// Selects entities crossing the specified polygon.
  acedSSGet('CP', pointlist, nil, nil, ssname);
  acutRelRb(pointlist);
 
  
// Selects the entities crossed by the specified fence.
  pt4[Y]:= 15.0; pt4[Z]:= 0.0;
  pointlist:
= acutBuildList([RTPOINT, APosToVar(pt1), RTPOINT, APosToVar(pt2),
    RTPOINT, APosToVar(pt3), RTPOINT, APosToVar(pt4), 
0]);
  acedSSGet(
'F', pointlist, nil, nil, ssname);
  acutRelRb(pointlist);

end;

 
原文地址:https://www.cnblogs.com/jssy/p/334929.html