ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

MapsurroundElement

  • 概要
  • ディスカッション
  • プロパティ
  • コードのサンプル

概要

Provides access to properties that enables its repositioning on the page layout as well as identifying its parent data frame.

ディスカッション

A MapsurroundElement object is a page element that has an association with a data frame. For example, there is a one-to-one relationship between a north arrow and a data frame. Mapsurround elements also include scale text and scale bars items. There is a property called parentDataFrameName that allows you to find the elements that are associated with a particular data frame. A legend element is also an example of a mapsurround, but because it has additional properties, it is a separate element type. The ListLayoutElements function returns a Python list of page layout element objects. It is necessary to then iterate through each item in the list or specify an index number to reference a specific page element object. To return a list of only MapsurroundElements, use the MAPSURROUND_ELEMENT constant for the element_type parameter. A wildcard can also be used to further refine the search based on the element name.

It is recommended that each page layout element be given a unique name so that it can be easily isolated using arcpy scripting. X and Y element positions are based on the element's anchor position, which is set via the Size and Position tab on the Elements Properties dialog box in ArcMap.

プロパティ

プロパティ説明データ タイプ
elementHeight
(読み書き)

The height of the element in page units. The units assigned or reported are in page units.

Double
elementPositionX
(読み書き)

The x location of the data frame element's anchor position. The units assigned or reported are in page units.

Double
elementPositionY
(読み書き)

The y location of the data frame element's anchor position. The units assigned or reported are in page units.

Double
elementWidth
(読み書き)

The width of the element in page units. The units assigned or reported are in page units.

Double
name
(読み書き)

The name of the element.

String
parentDataFrameName
(読み取り専用)

A string that represents the name of the DataFrame for the associated element.

String
type
(読み取り専用)

Returns the element type for any given page layout element.

  • DATAFRAME_ELEMENT —Dataframe element
  • GRAPHIC_ELEMENT —Graphic element
  • LEGEND_ELEMENT —Legend element
  • MAPSURROUND_ELEMENT —Mapsurround element
  • PICTURE_ELEMENT —Picture element
  • TEXT_ELEMENT —Text element
String

コードのサンプル

MapsurroundElement example

The following script will find the mapsurround element named ScaleBar and change it's position.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
scaleBar = arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT", "ScaleBar")[0]
df = arcpy.mapping.ListDataFrames(mxd, scaleBar.parentDataFrameName)[0]
scaleBar.elementPositionX = df.elementPositionX + (df.elementWidth / 2)
mxd.save()
del mxd

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2021 Esri. | プライバシー | リーガル