Class ConnectionSite
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
內容詳盡的說明文件
getIndex()
傳回連線網站的索引。在同一頁面元素上,所有連線網站的索引都是不重複的。
在大多數情況下,這會對應至 ECMA-376 標準中預先定義的連線網站索引。如要進一步瞭解這些連結網站,請參閱第 20.1.9.9 節和附錄 H 中「cnx」屬性的說明。「Office Open XML File Formats-Fundamentals and Markup Language Reference」第 1 部分「Predefined DrawingML Shape and Text Geometries」,
ECMA-376 第 5 版。
回攻員
Integer
:連線網站的索引。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPageElement()
傳回連線網站所在的 PageElement
。
回攻員
PageElement
:連結網站的頁面元素。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-04 (世界標準時間)。
[null,null,["上次更新時間:2025-08-04 (世界標準時間)。"],[[["\u003cp\u003eA connection site is a point on a PageElement where a connector can be attached.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the index of a connection site, which is unique within its PageElement, using \u003ccode\u003egetIndex()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetPageElement()\u003c/code\u003e allows you to retrieve the PageElement associated with a specific connection site.\u003c/p\u003e\n"],["\u003cp\u003eConnection sites often correspond to the ECMA-376 standard, allowing compatibility with various applications.\u003c/p\u003e\n"]]],["A `ConnectionSite` on a `PageElement` can connect to a connector. It offers two methods: `getIndex()` and `getPageElement()`. `getIndex()` returns the site's unique index as an `Integer`, corresponding to the ECMA-376 standard. `getPageElement()` returns the `PageElement` the connection site belongs to. Both methods require specific authorization scopes like `presentations.currentonly` or `presentations`. The index is unique within the element's connection sites.\n"],null,["# Class ConnectionSite\n\nConnectionSite\n\nThe connection site on a `Page``Element` that can connect to a [connector](/apps-script/reference/slides/line#isConnector()). \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------|-----------------------------------------------------------|-------------------------------------------------------------|\n| [getIndex()](#getIndex()) | `Integer` | Returns the index of the connection site. |\n| [getPageElement()](#getPageElement()) | [PageElement](/apps-script/reference/slides/page-element) | Returns the `Page``Element` that the connection site is on. |\n\nDetailed documentation\n----------------------\n\n### `get``Index()`\n\nReturns the index of the connection site. The index is unique among all the connection sites on\nthe same page element.\n\nIn most cases, it corresponds to the predefined connection site index from the ECMA-376\nstandard. More information on those connection sites can be found in the description of the\n\"cnx\" attribute in section 20.1.9.9 and Annex H. \"Predefined DrawingML Shape and Text\nGeometries\" of \"Office Open XML File Formats-Fundamentals and Markup Language Reference\", part\n1 of [ECMA-376 5th edition](https://ecma-international.org/publications-and-standards/standards/ecma-376/).\n\n#### Return\n\n\n`Integer` --- The index of the connection site.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Page``Element()`\n\nReturns the `Page``Element` that the connection site is on.\n\n#### Return\n\n\n[PageElement](/apps-script/reference/slides/page-element) --- The page element of the connection site.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`"]]