阅读:2449回复:6
delphi+AE缓冲区出问题
procedure TForm1.N7Click(Sender: TObject);<BR>var<BR>pmap:imap;<BR>enum:ienumfeature;<BR>sel:iselection;<BR>gra:igraphicscontainer;<BR>pfeature:ifeature;<BR>top:itopologicaloperator;<BR>geigeometry;<BR>geo1:igeometry;<BR>pele:IElement;<BR>s:olevariant;<BR>player:ilayer;<BR>begin<BR>mapcontrol1.ActiveView.Get_FocusMap(pmap);<BR>pmap.Get_FeatureSelection(sel);<BR>enum:=sel as ienumfeature;<BR>enum.Next(pfeature);<BR>//pfeature.Get_Value(0,s);<BR>//showmessage(s);<BR>pfeature.Get_Shape(geo);<BR>top:=geo as itopologicaloperator;<BR>top.Buffer(0.1,geo1);<BR>pele:=copolygonelement.create as ielement;<BR>pele.Set_Geometry(geo1);<BR>gra:=pmap as igraphicscontainer;<BR>gra.AddElement(pele,0);<BR>mapcontrol1.ActiveView.Refresh;<BR>end;<BR>end.
|
|
1楼#
发布于:2006-08-18 10:53
<img src="images/post/smile/dvbbs/em01.gif" />
|
|
2楼#
发布于:2006-08-07 12:07
<P>我的代码能正常执行的。其中一段是:</P>
<P> ASSERT(NULL != ipFeature);<BR> IGeometryPtr ipGeometry;<BR> HRESULT result = ipFeature->get_Shape(;ipGeometry);<BR> if (FAILED(result)) <BR> return;</P> <P> ITopologicalOperatorPtr ipTOperator(CLSID_Polyline);<BR> ipTOperator = ipGeometry;</P> <P> IGeometryPtr ipBuffer;<BR> result = ipTOperator->Buffer(m_dBufferDistance, ;ipBuffer);<BR> if (FAILED(result) || NULL == ipBuffer) <BR> return;</P> |
|
|
3楼#
发布于:2006-08-04 08:51
各位老大帮忙一哈
|
|
4楼#
发布于:2006-08-02 18:14
不解决我就不能让我的帖子落下
|
|
5楼#
发布于:2006-08-02 10:42
<P>我是根据一段vc代码搞的 日了哦 居然出错 出错的地方应当是获取shape 然后执行 buffer 这段代码出错 搞不懂 怎么回事 希望超级高手指点下</P>
|
|
6楼#
发布于:2006-08-01 20:04
<P>看来,还是VC使用起来塌实啊。</P>
|
|
|