c# - How to Convert ILayer to IPolygon In ArcObjects -


There is a problem converting one eyelaw to IPOLIZION.

I am developing a toolbar for the archipede and I have a polygon from the side table of the material through the code, but the code will not convert it to an IPOLIZION.

Can anyone help me? I am using this code and trying to convert it to IPOLGON ...

  IPolygon poly = m_document.maps.get_Item (0) .get_Layer (0) IPOLGAN in the form of;  

I can do this:

  Iiler Layer = M_data. Maps.Get_ITOM (0) .get_Layer (0) as the iLair;  

And it works, it is not converted into just one iplogan.

If you want to use the geometry contained in a sizefile layer, you will need to get the feature's feature square. This is a property of the IFeatureLayer interface, so you have to put your layer (which is an iLearer):

  Layer in the form of IFeatureLayer Flayer = IFeatureLayer; IFeatureClass FClass = Flair Feature Class;  

If you have a feature class, you can define the cursor in the index class (slow) or in the feature class (this is the fastest and preferred way when you will handle many IFeatureCursor ESRI docs usually come with good code snippets.)

If your convenience class has only one attribute, or if you only want one attribute, you can use the GetFeature method Are:

yellow crystals = F Class.GetFeature (0);

Now that you are almost there, the geometry of a feature has been kept away in the property of its size:

  IPOLIAN MYPOLI = MIFITURE Size as an IPOLIEN;  

Additional artists are required because the property's property is an IPOLIZION, which is more specific IGeometry.


Comments