laptop and a wrench

不具合

The sample IMultiPatch_QueryFollowingRings_Example crashes.

最後に公開された状態: August 25, 2014 No Product Found
不具合 ID 番号 NIM012089
送信されましたOctober 2, 2007
最終更新日June 5, 2024
適用対象No Product Found
見つかったバージョン9.2
プログラム言語C#
修正されたバージョン9.3
ステータスFixed

対処法

This code may be used to replace the sample IMultiPatch_QueryFollowingRings_Example. It works around the three issues identified: //Get the map document IMxDocument mxDocument = _mapDoc; //Get the features selection IEnumFeature selectedFeatures = mxDocument.FocusMap.FeatureSelection as IEnumFeature; //Loop over all selected features and look if it is a polygon //* FIX 3 IEnumFeatureSetup pEnumFeatureSetup; pEnumFeatureSetup = (IEnumFeatureSetup) selectedFeatures; // 'QI pEnumFeatureSetup.AllFields = true; // FIX 3 */ selectedFeatures.Reset(); IFeature currentFeature = selectedFeatures.Next(); while (currentFeature != null) { //Check if currentFeature is multipatch if (currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryMultiPatch) { IMultiPatch multiPatch = currentFeature.Shape as IMultiPatch; int ringType = 0; //* FIX 1 ringType = (int)esriMultiPatchRingType.esriMultiPatchBeginningRingMask; // FIX 1 */ int beginningRingsCount = multiPatch.get_BeginningRingCount(ringType); if (beginningRingsCount > 0) { IRing[] beginningRings = new IRing[beginningRingsCount]; IGeometryBridge geometryBridge = new GeometryEnvironmentClass(); geometryBridge.QueryBeginningRings(multiPatch, ringType, ref beginningRings); //* FIX 2 int totalFollowingRingsCount=0; for (int i = 0; i < beginningRings.Length; i++) { int followingRingsCount = multiPatch.get_FollowingRingCount(beginningRings[i]); if (followingRingsCount > 0) { IRing[] followingRings = new IRing[followingRingsCount]; geometryBridge.QueryFollowingRings(multiPatch, beginningRings[i], ref followingRings); totalFollowingRingsCount = totalFollowingRingsCount + followingRings.Length; } } System.Diagnostics.Debug.WriteLine("Feature with OID = " + currentFeature.OID + " has " + beginningRings.Length + " inner Rings and " + totalFollowingRingsCount + " following Rings"); // FIX 2 */ } else { System.Diagnostics.Debug.WriteLine("Feature with OID = " + currentFeature.OID + " has " + " 0 inner Rings and 0 following Rings"); } } currentFeature = selectedFeatures.Next(); }

再現の手順

不具合 ID: NIM012089

ソフトウェア:

  • No Product Found

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動