Automatic length, width and area calculation of rectangle into tabular form.

Automatic length, width and area calculation of rectangle into tabular form.

kcsushantkc
Explorer Explorer
5,214 Views
21 Replies
Message 1 of 22

Automatic length, width and area calculation of rectangle into tabular form.

kcsushantkc
Explorer
Explorer

Hi, guys hope all of you are staying safe and doing best from yourself. I am an electrical engineer by profession while doing some of the research for my work I came across this .lsp code written by our lee mac programming kudos to them. This code calculates the area of the rectangle and shows it in tabular form. I wanted to edit this code which can also display the length, width, and area of the selected rectangle respectively. Can anybody help me with this one? I've attached the code and recent output and wanted output pictures herewith for reference.
PS: I don't want to change anything on code it is working flawlessly just wanted to add length and width column sections on the above code. Feel free to contact me regarding any confusions 🙂
Thanks in advance.
Stay safe, stay home.

0 Likes
Accepted solutions (1)
5,215 Views
21 Replies
Replies (21)
Message 21 of 22

Sea-Haven
Mentor
Mentor

Drew 5 rectangs as  test picking red lines, can be very quick if accuracy is not critical then a report made. I am sure can get the make rectangs very fast even thinking now. A product like Bricscad is cheap for this type of task. A few others as well may even be cheaper but support VL-lisp.

 

The area type calcs is the easy part.

 

The catalog page is an image not a true pdf. Not sure what adobe product may allow draw rectangs on pdf. Or just add via like paintbrush and then use OCR to make dwg.

0 Likes
Message 22 of 22

kcsushantkc
Explorer
Explorer

Hi, @pbejse  hope you are doing great like your code.  I'm thinking of having some moderation in the principle, the code is working completely fine. The code currently shows the most extended portion as length and the shortest portion as the width. For example: if I have a rectangle of 5 meters on one side and 2 meters on another. The length will always be 5 meters. Now, I'm thinking of what if we take the length not respective with the longer side but with respect to the axis. For example: The rectangular vertical side parallel to the y-axis will be named as length and the horizontal side will be in width. Thanks in advance.

Capture.PNG

0 Likes