本文簡要介紹 python 語言中 arcgis.gis.Item.add_relationship
的用法。
用法:
add_relationship(rel_item, rel_type)
返回:
指示成功 (True) 或失敗 (False) 的布爾值
add_relationship
方法將關係從當前項目添加到rel_item
。注意:
注意:關係不與項目綁定。相反,它們是從源項目到目標項目的定向鏈接,並且具有類型。關係的類型定義了有效的來源和目的地項目類型以及一些規則。有關詳細信息,請參閱 REST API 幫助中的 Relationship types。除非關係類型的規則如此定義,否則用戶不必擁有他們相關的項目。
用戶隻能刪除他們創建的關係。
如果兩個項目之一被刪除,關係將自動刪除。
Parameter
Description
rel_item
與相關項目對應的必需項目對象。
rel_type
必需的字符串。相關項目的類型;是 [‘Map2Service’, ‘WMA2Code’, ‘Map2FeatureCollection’, ‘MobileApp2Code’, ‘Service2Data’, ‘Service2Service’] 之一。有關此參數的更多信息,請參閱 REST API 幫助中的Relationship Types。
例子:
# Usage Example >>> item.add_relationship(reL_item=item2, rel_type='Map2FeatureCollection') <True>
相關用法
- Python ArcGIS Item.add_comment用法及代碼示例
- Python ArcGIS Item.publish用法及代碼示例
- Python ArcGIS Item.reassign_to用法及代碼示例
- Python ArcGIS Item.share用法及代碼示例
- Python ArcGIS Item.status用法及代碼示例
- Python ArcGIS Item.delete_relationship用法及代碼示例
- Python ArcGIS Item.download用法及代碼示例
- Python ArcGIS Item.delete用法及代碼示例
- Python ArcGIS Item.copy用法及代碼示例
- Python ArcGIS Item.move用法及代碼示例
- Python ArcGIS Item.related_items用法及代碼示例
- Python ArcGIS Item.create_tile_service用法及代碼示例
- Python ArcGIS Item.register用法及代碼示例
- Python ArcGIS Item.copy_feature_layer_collection用法及代碼示例
- Python ArcGIS Item.export用法及代碼示例
- Python ArcGIS Item.update_thumbnail用法及代碼示例
- Python ArcGIS Item.update用法及代碼示例
- Python ArcGIS Item.usage用法及代碼示例
- Python ArcGIS Item.get_thumbnail用法及代碼示例
- Python ArcGIS ImageryLayer.thumbnail用法及代碼示例
- Python arcgis.apps.hub.Initiative.update用法及代碼示例
- Python ArcGIS ImageryLayer.draw_graph用法及代碼示例
- Python arcgis.apps.hub.IndicatorManager.add用法及代碼示例
- Python arcgis.apps.hub.InitiativeManager.add用法及代碼示例
- Python ArcGIS ImageryLayer.compute_stats_and_histograms用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.gis.Item.add_relationship。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。