IT– category –
-
コマンドから表示するフォームをアプリケーションの最上位に設定する方法
[vb title="VBA / VB6"] Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer Public Declare Function GetParent Lib "user32" (ByVal hWnd As Integer) As Integer Public Const GWL_HWN... -
アセンブリのフルパス名を取得する方法
[csharp title="C#"] string stParentName = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); [/csharp] [vb title="Visual Basic"] string stParentName = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); [/vb] -
フィールド演算による日付の出力
[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"] import re import arcpy #ラスタ カタログのパス path = r"C:\Users\Administrator\Documents\ArcGIS\Default.gdb\RasterCatalogManaged" # SearchCursor 関数を使用して Cursorオブジェクトを取得 cur = arcpy.da.SearchCursor(path,["Raster"]) # Cursor内の row オブジェクトを使用し... -
保護中: PMF ファイルをエクスプローラーでプレビューすると落ちる
この記事はパスワードで保護されています -
ラベルエンジンの切り替え
[vb title="VBA"] Protected Overrides Sub OnClick() Dim pMaps As IMaps Dim pMap As IMap Dim index As Long pMaps = My.ArcMap.Document.Maps Dim pAnnotateMap As IAnnotateMap For index = 0 To pMaps.Count - 1 pMap = pMaps.Item(index) 'get the map at the current index pAnnotateMap = pMap.AnnotationEngine If TypeOf ... -
ラスターのコンバート
[vb title="VBA"] Public Sub subExportRaster() '変換元ラスタ Dim pRasterLayer As IRasterLayer Set pRasterLayer = pMap.Layer(0) Dim pRaster As IRaster Set pRaster = pRasterLayer.Raster 'RasterConversionOp Dim pConvrsionOp As IConversionOp Set pConvrsionOp = New RasterConvers... -
一次元低いジオメトリを取得する方法
[vb title="VBA"] '例:ポリゴンのアウトラインをポリラインで取得する 'ITopologicalOperator::Boundary [/vb] -
真円を作成する方法
[csharp title="C#"] //中心点座標 double X = ; //UTM座標系のX座標値 double Y = ; //UTM座標系のY座標値 double radius = 10500; //半径 //中心点 Point 作成 IPoint pPCenter = new PointClass(); pPCenter.PutCoors(X,Y); //円周接点 Point 作成 IPoint pFromTo As IPoint = new PointClass(); pFromTo.PutCoords(X + radius, Y); ... -
ArcScene と ArcGlobe によるクリック地点のポイント座標取得
[vb title="VBA"] 'ArcSceneによるクリック地点のポイント座標取得 Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long) Dim pSxDocument As ISxDocument Set pSxDocument = ThisDocument Dim pSceneGraph As ISceneGraph Set pSceneGraph = pSxDocu...
