Jump to content

Find Civil3D Parcel Area with Lisp


Aftertouch

Recommended Posts

Hello all,

 

I seem to be able to find all kinds of information of a 'Civil3D Parcel' with Lisp functions.

 

But for some reason i cannot extract the parcel 'Area' and Perimeter for some reason. The Number doesnt seem to be a problem.

 

Where can i find this information?

A 'dump' shows me allot, exept those 2...

 

Select object: ; IAeccParcel: IAeccParcel Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAeccApplication 00000217b3bcd260>
;   AreaLabels (RO) = #<VLA-OBJECT IAeccParcelAreaLabels 00000217c7457e90>
;   AreaLabelStyle = #<VLA-OBJECT IAeccLabelStyle 00000217b37b0420>
;   Description = ""
;   DisplayName (RO) = "HB_Plot_Parcels_Nieuw : 1"
;   Document (RO) = #<VLA-OBJECT IAeccDocument 00000217b3bcd4d0>
;   EntityTransparency = "ByLayer"
;   Handle (RO) = "1335F"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 00000217adfaddc8>
;   Layer = "C3D-PARCEL"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Name = "HB_Plot_Parcels_Nieuw : 1"
;   Number = 1
;   ObjectID (RO) = 42
;   ObjectName (RO) = "AeccDbFace"
;   OwnerID (RO) = 44
;   ParcelLoops (RO) = #<VLA-OBJECT IAeccParcelLoops 00000217b3bce160>
;   Parent (RO) = #<VLA-OBJECT IAeccSite 00000217b36f0ef0>
;   PlotStyleName = "ByLayer"
;   ShowToolTip = -1
;   Statistics (RO) = #<VLA-OBJECT IAeccParcelStatistics 00000217b3bcd590>
;   Style = #<VLA-OBJECT IAeccParcelStyle 00000217add8c260>
;   StyleName (RO) = "HB_Plot_Parcels_Nieuw"
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 00000217adfad2e0>
;   Visible = -1

Link to comment
Share on other sites

You just need to keep digging into the VLA objects.

 

(and (setq o (car (entsel)))
    (setq o (vlax-ename->vla-object o))
    (setq o (vlax-get o 'statistics))
    (setq a (vlax-get o 'area))
    (setq p (vlax-get o 'perimeter))
)

; IAeccParcelStatistics: IAeccParcelStatistics Interface
; Property values:
;   Area (RO) = 48.7291
;   Perimeter (RO) = 28.8796
; No methods

Link to comment
Share on other sites

Hello ronjonp,

 

Yes this is what i was looking for.

For some reason i checked all VLA objects, but seem to have missed this one.

Got it all sorted now. :-)

 

Thanks for the suggestion!

 

I am now able to get a total area of all parcels quickly. ;-)

Link to comment
Share on other sites

Hello ronjonp,

 

Yes this is what i was looking for.

For some reason i checked all VLA objects, but seem to have missed this one.

Got it all sorted now. :-)

 

Thanks for the suggestion!

 

I am now able to get a total area of all parcels quickly. ;-)

 

Good deal! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...