Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

area command problems

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
563 Views, 2 Replies

area command problems

Does anyone have no of a fix for the area command change in 2010. I have
several programs that I use the Area command with that no longer work.
Plines that cross over themselves are ignored, I use the area command then
pull the Perimeter setvar to get the length in several programs.
I know that I can use VL functions to in place of the area command for this
purpose but I don't have time right now to go thru the learning curve.

Thanks
Rodney
2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: Anonymous

Try
command "LENGTHEN"
then
getvar "perimeter"

henrique

EESignature

Message 3 of 3
Anonymous
in reply to: Anonymous

Hi,
This subject was diiscussed here recently and there's Tony's solution which
can be used without necessarely going to the learning curve, at least not
right now:

;;;=============================
(defun c:getarea ( / try-get-property ent area)

(vl-load-com)

;;;-------------------------------------
;;;The next function is by Tony Tanzillo
;;;-------------------------------------
(defun try-get-property (obj prop / result)
(vl-catch-all-apply
(function
(lambda ()
(setq result
(vlax-get-property obj prop)
)
)
)
)
result
)

(if (setq ent (car (entsel "\nSelect hatch: ")))
(if (= (cdr (assoc 0 (entget ent))) "HATCH")
(if
(setq area
(try-get-property
(vlax-ename->vla-object ent)
'Area
)
)
(princ (strcat "\nArea is " (rtos area)))
(princ "\nHatch has no area.")
)
(princ "\nSelection was not a hatch.")
)
(princ "\nNothing selected.")
)
(princ)
)
;;;=============================

HTH

"Rodney" a écrit dans le message de news:
6372206@discussion.autodesk.com...
Does anyone have no of a fix for the area command change in 2010. I have
several programs that I use the Area command with that no longer work.
Plines that cross over themselves are ignored, I use the area command then
pull the Perimeter setvar to get the length in several programs.
I know that I can use VL functions to in place of the area command for this
purpose but I don't have time right now to go thru the learning curve.

Thanks
Rodney

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost