Getting area

Getting area

Muhammed.OPERA
Advisor Advisor
1,548 Views
3 Replies
Message 1 of 4

Getting area

Muhammed.OPERA
Advisor
Advisor

Hi everyone 🙂

I'm trying to get area of a polyline to store it's value to get it in some equations in lisp.

Is there any code can get area of polyline

I think that's Entget

I don't know is it or not and i don't know how to use it.

I hope you can help me with that.

Thanks for all


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes
Accepted solutions (1)
1,549 Views
3 Replies
Replies (3)
Message 2 of 4

john.uhden
Mentor
Mentor
Accepted solution

If you convert an ename of a polyiline into a vla-object, you can...

(setq area (vlax-get object 'area))

 

or if E is the entity name, then in longer terms...

(setq area (vlax-get (vlax-ename->vla-object E) 'Area))

John F. Uhden

Message 3 of 4

Muhammed.OPERA
Advisor
Advisor

I have tried it . it's working

Thank you for your time Smiley Happy


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes
Message 4 of 4

_Tharwat
Advisor
Advisor

Hi,

 

With the use of vlax-curve-* functions you can get the length of any object that have a length property and without converting the target object to vla-object as follows. 

 

(setq e (car (entsel "\nSelect polyline :")))
(vlax-curve-getdistatparam e (vlax-curve-getendparam e))