プログラミング– category –
-
一時的な描画を AfterItemDraw イベントで描画し続ける方法
[vb title="VBA"] Private WithEvents ActiveViewEvents As Map Private m_pMxDoc As IMxDocument Private m_pBufferPolygon As IPolygon Private m_pLastBufferedExtent As IEnvelope Private m_pFillSymbol As ISimpleFillSymbol Public Sub InitEvents() Dim pViewManager As IViewManager Dim pRgbColor As IRgbColor Set m_... -
ツールチップの制御
[vb title="VBA"] 'IFeatureLayerの取得 Dim pFeatureLayer As IFeatureLayer Set pFeatureLayer = pLayer 'ツールチップを表示するフィールド名を指定 pFeatureLayer.DisplayField = "JCODE" 'ツールチップの表示をOn pFeatureLayer.ShowTips = True '指定した座標・トレランスでツールチップ情報を表示 Dim strToolTip As ... -
マップ サービス レイヤーを追加
[vb title="VBA"] Sub test() Dim pGxApplication As IGxApplication Set pGxApplication = Application Dim pMxDocument As IMxDocument Set pMxDocument = ThisDocument Dim pGxObject As IGxObject Set pGxObject = pGxApplication.SelectedObject If TypeOf pGxObject Is IGxAGSMap... -
レイヤー情報を取得
[vb title="VBA"] 'pLayerがNothingの場合、intLayerからLayerオブジェクトを取得 'pLayerが存在する場合、pLayerからレイヤ インデックス番号を返す Function FindLayerInfomation(ByVal pMap As IMap, ByRef pLayer As ILayer, ByRef intLayer As Integer) If pLayer Is Nothing Then '戻り値:pLayer pLayer = pMap.La... -
SetWindowPos
[vb title="VBA / VB6"] 'APIの宣言 '****************************************************************************** ' 定義 :SetWindowPos Lib ' 概要 :WindowsAPI宣言 ' 第1引数 :Long ' 第2引数 :Long ' 第3引数 :Long ウインドウの左上隅の新しい座標(ピクセル) ' 第4引数 :Long ウインドウの左上隅の... -
オブジェクトの配列宣言
[csharp title="C#"] IPoint[] pointArray = new IPoint[2]; pointArray[0] = new PointClass(); pointArray[1] = new PointClass(); pointArray[0].PutCoords(0, 0); pointArray[1].PutCoords(100, 100); IEnvelope env = new EnvelopeClass(); IEnvelopeGEN envGEN = new EnvelopeClass(); //Will not compile. env.DefineFromPoints(3... -
フィールド演算による日付の出力
[python title="Python"] def GetDDMMSS(field): tdatetime = datetime.datetime.strptime(field, '%Y/%m/%d %H:%M:%S') return tdatetime.strftime('%Y/%m/%d') [/python] -
ジオメトリの投影変換
[python title="Python"] #コードブロック def GetPointX(point): point = point.getPart(0) srFrom = arcpy.SpatialReference(2451) #JGD_2000_Japan_Zone_9 srTo = arcpy.SpatialReference(4612) #GCS_JGD_2000 pointGeometry = arcpy.PointGeometry(point, srFrom) #引数からPointGeometryオブジェクトの作成 newPointGeom... -
LoaderLock エラー・C++ Runtime エラー発生時の対処
C ランタイムライブラリのロードでエラー R6034 が発生するのは、マニフェストがないために発生するエラーとなっています。マニフェストとともにアプリケーションがビルドされるようにするとエラーが回避できます。 C Run-Time Error R6034 以前にも状況は異なりますが、同様のエラーの発生に関して問い合わせがありその時に、回避方法として... -
ArcGIS 10.1 for Server 以降のサービス公開
http://gis.stackexchange.com/questions/27873/arcobjects-arcserver-10-1-how-to-programatically-publish-a-map-service
