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;

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值