|
阅读:1677回复:3
求助:creatfeatureclass问题
<P>代码如下:</P>
<P>Dim pWorkspaceFactory As IWorkspaceFactory<BR> Dim pPropertySet As IPropertySet<BR> Set pWorkspaceFactory = New SdeWorkspaceFactory<BR> Set pPropertySet = New PropertySet<BR> <BR> With pPropertySet<BR> .SetProperty "SERVER", ArcSDE.Server.Text<BR> .SetProperty "INSTANCE", ArcSDE.Instance.Text<BR> .SetProperty "USER", ArcSDE.UserName.Text<BR> .SetProperty "PASSWORD", ArcSDE.UserPwd.Text<BR> .SetProperty "VERSION", "SDE.DEFAULT"<BR> End With<BR> <BR> Set pWkSp = pWorkspaceFactory.Open(pPropertySet, 0)</P> <P>Dim pFeatWS As IFeatureWorkspace<BR> Set pFeatWS = pWkSp<BR> Dim pFeatclass As IFeatureClass<BR> Dim pFields As IFields</P> <P><BR> '产生一个新的字段集合<BR> Set pFields = New Fields<BR> Set pFieldsEdit = pFields<BR> pFieldsEdit.FieldCount = 1<BR> <BR> Dim pSpatRefFact As ISpatialReferenceFactory<BR>Set pSpatRefFact = New SpatialReferenceEnvironment</P> <P>Dim pProjCoordSys As IProjectedCoordinateSystem<BR>Set pProjCoordSys = pSpatRefFact.CreateProjectedCoordinateSystem(esriSRProjCS_Beijing1954_3_Degree_GK_CM_120E)</P> <P><BR>Set pSpatRef = pProjCoordSys</P> <P>pSpatRef.SetDomain 400000, 600000, 100000, 300000<BR>pSpatRef.SetFalseOriginAndUnits 500000, 200000, 9<BR>pSpatRef.SetMDomain 0, 1<BR>pSpatRef.SetMFalseOriginAndUnits 1, 1<BR>pSpatRef.SetZDomain 0, 1<BR>pSpatRef.SetZFalseOriginAndUnits 1, 1<BR> Dim pGeodef As IGeometryDefEdit<BR> Set pGeodef = New GeometryDef<BR> With pGeodef<BR> .GeometryType = esriGeometryPolygon<BR> Set .SpatialReference = pSpatRef<BR> End With<BR> Dim pFieldEdit As IFieldEdit</P> <P> Set pFieldEdit = New Field<BR> With pFieldEdit<BR> .Name = "Shape"<BR> .IsNullable = True<BR> .Type = esriFieldTypeGeometry<BR> Set .GeometryDef = pGeodef<BR> End With<BR> Set pFieldsEdit.Field(1) = pFieldEdit</P> <P>Set pFeatclass = pFeatWS.CreateFeatureClass("gongcheng", pFieldsEdit, Nothing, Nothing, esriFTSimple, "Shape", "")<BR> </P> <P>在sde中createfeatureclass时报错:the application is not licensed to create or modify schema for this type of data.请问是哪的问题</P> |
|
|
1楼#
发布于:2006-10-28 13:11
<P>进行license检测,是否有GDBEDIT许可</P>
|
|
|
|
2楼#
发布于:2006-10-29 23:00
<P>至少要arceditor以上的权限才能修改GDB。。。</P>
<P>我用盗版就出现了这个问题,换成正版后就没有了。。。</P> |
|
|
3楼#
发布于:2006-10-30 17:39
参照Engine应用程序开发,对你的应用程序进行初始化.
|
|