Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a feature layer with land parcels. Each parcel is a polygon. So, I want to calculate the perimeter of each polygon using VBA and ArcObjects. Is there any ready code in VBA and ArcObjects to do this?

Any help please?

Thanks Deme

share|improve this question
    
Hi Demetris, if the reply to your previous question was satisfactory, can you please mark it as an answer before you ask a new question. This keeps the answering spirit of participants alive... –  ujjwalesri Jun 1 '11 at 7:17
1  
@Ujj Six hours is a little hasty! It's wise for questioners to wait some period--a few days usually--before accepting answers, because good new ones continue to come in. Also, SE sites never have asked that everybody accept all answers before asking new questions. –  whuber Jun 1 '11 at 13:11
add comment

2 Answers

You could use the ICurve3 interface. Here is a full ArcObjects sample.

Dim dblPerimeter as double
Dim pCurve as ICurve3
Set pCurve = pYourPolygon    
dblPerimeter = pCurve.Length

Update - Select feature, code example link:

share|improve this answer
    
Thank you for that code. However, what I have to do before that; I mean I have just to write a code to select the certain polygon? –  Demetris Jun 1 '11 at 12:21
    
@Demetris, I will update my answer with a select feature code example. –  artwork21 Jun 1 '11 at 12:47
    
Ok. Thank you very much. So, the new code will be complete to check it? –  Demetris Jun 1 '11 at 14:26
add comment

All polygons have a length property, so you can simply access that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.