osman hömek / not defteri

May 10, 2008

web uygulaması içerisinden batch file çalıştırma (c#)

Filed under: dotnet — osman @ 2:44 pm

        string filename = @”c:\osman.py”;
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = filename;
prc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
prc.Start();
prc.WaitForExit();
prc.Close();

May 1, 2008

2 saatten fazla vaktimi çalan DefinitionQuery, 9.2′deki adıyla DefinitionExpression

Filed under: programlama — osman @ 11:01 am

int resource_index = 1;

ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality mfdesc = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality)Map1.GetFunctionality(resource_index);
MapDescription mapDescription = mfdesc.MapDescription;
string definitionExpression = mapDescription.LayerDescriptions[0].DefinitionExpression.ToString();

9.2 server context geyikleri

Filed under: arcobjects — osman @ 10:58 am

        ESRI.ArcGIS.Server.WebControls.ServerConnection connection;
connection = new ESRI.ArcGIS.Server.WebControls.ServerConnection();
connection.Host = “hostun adi”;
connection.Connect();

IServerContext ctx = connection.ServerObjectManager.CreateServerContext(”ArcGis Service in adı”, “MapServer”);
IMapServer mapsrv = ctx.ServerObject as IMapServer;

IMapServerObjects mapo = mapsrv as IMapServerObjects;
IMap map = mapo.get_Map(mapsrv.DefaultMapName);

int ActiveLayerIndex = GetQueryLayers(”katmanin toc/mxd de gorunen adi”, “map resource un katman adi”);

int ActiveLayerIndex = GetQueryLayers(”ist_binalar”, “Veri_Katmani”);
IFeatureLayer flayer = map.get_Layer(ActiveLayerIndex) as IFeatureLayer;

IAttributeTable attTable = (IAttributeTable)flayer;

int fieldCount = attTable.AttributeTable.Fields.FieldCount;

attTable.AttributeTable.Fields.get_Field(1).Name;

string TableObjectIdName = attTable.AttributeTable.OIDFieldName;

Powered by WordPress