- 积分
- 582
- 明经币
- 个
- 注册时间
- 2002-9-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
用Delphi作选择集,选择区域为以点(x,y)为中心的矩形区域。为何提示“未指定的错误”?[br]var sset:OleVariant;
Procedure TFormEdit.DoTrimBeam(x,y:double);
var FilterType,FilterData,gpCode,dataValue:variant;
var Point,point1,point2:variant;
var i:integer;
begin
sset:=ac.SelectionSets.Add('SS1');
Point:=VarArrayCreate([0, 11], vardouble);
gpCode:=VarArrayCreate([0, 4], varInteger);
dataValue:=VarArrayCreate([0, 4], varVariant);
FilterType:=VarArrayCreate([0, 4], varInteger);
FilterData:=VarArrayCreate([0, 4], varVariant);
point1:=VarArrayCreate([0, 3], vardouble);
point2:=VarArrayCreate([0, 3], vardouble);
Point1[0]:=x*1000.0-2000.0oint1[1]:=y*1000.0-2000.0oint1[2]:=0.0;
Point2[0]:=x*1000.0+2000.0oint2[1]:=y*1000.0+2000.0oint2[2]:=0.0;
Point[0]:=x*1000.0-2000.0oint[1]:=y*1000.0-2000.0oint[2]:=0.0;
Point[3]:=x*1000.0+2000.0oint[4]:=y*1000.0-2000.0; Point[5]:=0.0;
Point[6]:=x*1000.0+2000.0oint[7]:=y*1000.0+2000.0oint[8]:=0.0;
Point[9]:=x*1000.0-2000.0oint[10]:=y*1000.0+2000.0oint[11]:=0.0;
gpCode[0]:=8 ;
dataValue[0]:=LayerConcreteColumn;
gpCode[1]:=8;
dataValue[1]:=LayerConcreteColumn;
gpCode[2]:=8;
dataValue[2]:=LayerConcreteColumnA;
gpCode[3]:=8;
dataValue[3]:=LayerConcreteColumnKZ;
gpCode[4]:=8;
dataValue[4]:=LayerConcreteColumnKZA;
for i:=0 to 4 do
begin
FilterType:=gpCode;
FilterData:=dataValue;
end;
sset.SelectByPolygon(1,Point,FilterType,FilterData);
end; |
|