Python objects pointing to the same underlying ArcObjects should be equal.
最後に公開された状態: August 25, 2014No Product Found
不具合 ID 番号
NIM081848
送信されました
June 18, 2012
最終更新日
June 5, 2024
適用対象
No Product Found
見つかったバージョン
10.1
ステータス
Will Not Be Addressed
開発チームは、この問題またはリクエストを検討した結果、これに対処しないことに決定しました。 問題の「参考情報」セクションに、さらに詳細な説明が示されていることがあります。
参考情報
We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.
対処法
Temporarily set the name of the active data frame to something unique:import randomactiveDF = mxd.activeDataFrameactiveDFName = <a href="http://activeDF.name" target="_blank">activeDF.name</a># Swap in unique name<a href="http://activeDF.name" target="_blank">activeDF.name</a> = "UNIQUEDF{}".format(random.randint(1000, 10000))selectedDF = pythonaddins.GetSelectedTOCLayerOrDataFrame()# Test if they’re the sameis_dataframe_selected = (<a href="http://selectedDF.name" target="_blank">selectedDF.name</a> == <a href="http://activeDF.name" target="_blank">activeDF.name</a>)# Swap back out<a href="http://activeDF.name" target="_blank">activeDF.name</a> = activeDFName