阅读:2169回复:7
改变图元id的问题
ftr.Name := edm.Text;
ftr.Update(EmptyParam,EmptyParam); 斑竹,以上的代码会出错,说变量类型与付值不符,请问该如何改变图元的id. <img src="images/post/smile/dvbbs/em11.gif" /> |
|
1楼#
发布于:2003-12-24 16:33
肯定会出误!
ftr.name 是一个只读属性。 |
|
2楼#
发布于:2003-12-24 20:55
我想改图元的id,有办法吗?怎么弄?
|
|
3楼#
发布于:2003-12-24 22:43
图元的id是只读的,不可以改!
|
|
4楼#
发布于:2003-12-25 10:31
以前我看到有此类的文章,但现在找不到了,不知道谁看到过,直到的请告知,谢谢!
|
|
5楼#
发布于:2003-12-25 11:38
下面是MAPX的帮助文档,你可以看看!
Feature.FeatureID property (Feature object) Purpose This property returns the ID of the feature. Each feature in a layer contains a unique ID within the layer. This is an Integer value and is read-only. This is the default property for the Feature object. Note:Although this property is still a functional part of MapX, it is recommended that you use the Feature.FeatureKey. The FeatureKey property is used to identify a unique record in a table. In previous versions, the FeatureID property was used for this purpose, but it did not work correctly for seamless and remote layers. The FeatureKey property works for all layer types |
|
6楼#
发布于:2003-12-25 15:48
是不能改的
|
|
7楼#
发布于:2003-12-25 19:23
看来只能先建一个另时的ftr变量,然后把图元clone给它,然后把图元删除,修改ftr的属性。再添加新图元ftr,不知道这样行不行!
|
|