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

Lisp for pick point and measure area

9 REPLIES 9
Reply
Message 1 of 10
mvanbodegraven
2911 Views, 9 Replies

Lisp for pick point and measure area

I'm wondering if there is a lisp possible to measure area's by pick point (as in bpoly). This little feature exists in Microstation so i was looking for something similar.
Is it also possible if this lisp can measure areas from an external reference (dwg, dxf, dgn, shp etc..)? I'm kind of new to AutoCAD in that sence so if someone could help me out..

 

Thanks.

9 REPLIES 9
Message 2 of 10

A Search will yield multiple threads, such as this:

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Area-Label-Lisp-Routine/m-p/3347647/h...

Kent Cooper, AIA
Message 3 of 10

Thanks,

 

This is what i was looking for.

Message 4 of 10

Is it Possible to have this Code altered to use Alpha Character rather than Numerical?

Message 5 of 10
Kent1Cooper
in reply to: Kyle.Pederson


@Kyle.Pederson wrote:

Is it Possible to have this Code altered to use Alpha Character rather than Numerical?


[How would alphabetic characters represent an area?]

Kent Cooper, AIA
Message 6 of 10
Kyle.Pederson
in reply to: Kent1Cooper

area test.PNG

 

The Code Spits out 3 lines, one container a number that increases each time, the Area, and the Perimeter. (I've edited out the perimeter) I'd like to replace the Numerical Value to be an increasing Alpha Character.  Even More so I'd like to be able to tell it when to Change Alpha Characters. Example would be if I wanted to Count both those Boxes as Section A , or one as Section A and one as Section B. I'd like an option to tell it what to do.

Message 7 of 10
dlanorh
in reply to: Kyle.Pederson

      ;;;--- Get the plot number to use from the USERI1 system variable.
      (setq myNum(getvar "useri1"));

      ;;;--- Don't start with zero, which is Autocad's default
      (if (or (< myNum 65) (> myNum 90)) (setq myNum 65))

      ;;;--- Increment the counter before saving for next time
      (setvar "useri1" (+ myNum 1))

      ;;;--- Convert the number to a string
      (setq myNum(chr myNum))

Alter the two lines of code replaceing the existing with the red items. This should now generate capital letters instead of numbers for the area designation

I am not one of the robots you're looking for

Message 8 of 10
Kyle.Pederson
in reply to: dlanorh

Perfect! thanks Dlanorh! Is it possible to have it select multiple areas and still use the same Alpha Character until I hit "Enter" thus changing the Alpha Character?

Message 9 of 10
dlanorh
in reply to: Kyle.Pederson


@Kyle.Pederson wrote:

Perfect! thanks Dlanorh! Is it possible to have it select multiple areas and still use the same Alpha Character until I hit "Enter" thus changing the Alpha Character?


Is that select multiple areas each having the same letter or select multiple areas to add together into a single area?

 

I haven't looked to deeply into the code, but either will probably require a re-write of part of the code.

I am not one of the robots you're looking for

Message 10 of 10
john.uhden
in reply to: dlanorh

Here's an old one of mine.  You have to select one target layer, and it looks only for closed polylines on that layer.  You can embellish it to add any prefix you want.

John F. Uhden

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

Post to forums  

Autodesk Design & Make Report

”Boost