Get table of multiple areas, location of geometric center and label

Get table of multiple areas, location of geometric center and label

Anonymous
Not applicable
1,771 Views
13 Replies
Message 1 of 14

Get table of multiple areas, location of geometric center and label

Anonymous
Not applicable

I have a file with multiple rectangular areas. I'm looking to create a lisp that will label each area (QQ999_) where the last blank is an increasing count (so the first label would end in 1, then the next with 2 then 3 etc.) and then generate a table which will include

 

[label name] [area of object] [x coordinate of geometric center] [y coordinate of geometric center]

 

If this table could export to excel, that would be amazing!

 

I dont really have any background in lisp, so any help would be much appreciated! Thanks so much!!

0 Likes
Accepted solutions (1)
1,772 Views
13 Replies
Replies (13)
Message 2 of 14

devitg
Advisor
Advisor
Please upload the DWG sample.
0 Likes
Message 3 of 14

Anonymous
Not applicable

Thanks for responding!

 

I have attached a sample autocad file. I have also attached an excel table with the output that I would need. Also, if the areas could be labeled in the autocad file with the same name as referenced in the table as well (with leaders or anything), that would be really helpful. 

 

Also, are the coordinates able to be referenced from the UCS?

0 Likes
Message 4 of 14

salman_majgaonkar
Contributor
Contributor

Hi,
try this lisp(.fas) attached here, should work as expected.
Hope this helps,

 

Command is "RA1"

 

 

 

Salman M.

0 Likes
Message 5 of 14

Anonymous
Not applicable

Thanks so much Salman! It worked amazingly!!

 

Is there anyway to also add labels to the rectangles as well (corresponding to the name in the table)? And, is it possible for the coordinates to be relative to the UCS?

 

Thanks again!!

0 Likes
Message 6 of 14

salman_majgaonkar
Contributor
Contributor

it is already in command just change settings to "label tag = yes"

command: RA1 enter, S enter, enter, enter, Y enter and select object

0 Likes
Message 7 of 14

Anonymous
Not applicable

O, okay thanks! I didn't realize that- now I see it.  And what about getting the coordinates to be with respect to the UCS?

 

 

0 Likes
Message 8 of 14

Anonymous
Not applicable

Also, sorry to be annoying, but I forgot to mention that some of the rectangles are rotated. And I think the way the .fas file calculates areas doesn't account for this because in the attached .dwg file, all 4 rectangles are the same, just rotated with different angles, but the areas shown in the table are different.

 

Please let me know. I really really appreciate your help!

0 Likes
Message 9 of 14

devitg
Advisor
Advisor
The first you should had to do , was to show the real dwg , and all
constarint.

--

Nombre: Gabriel
Apellido: CALÓS
SERVICIOS MECATRÓNICOS ®
DUCASSE 948
CÓRDOBA
(X5000FVF)
ARGENTINA
TEL 054-351-471-0256
CEL 0351-156-192177
devitg@gmail.com

"la victoria es propicia a los que se preparan"

AMAT VICTORIA CURAM
0 Likes
Message 10 of 14

salman_majgaonkar
Contributor
Contributor
Accepted solution

Check this command

Message 11 of 14

Anonymous
Not applicable

This is perfect, thanks so much for all your help!!  Is there anyway this can be extended to work for paralleograms or other shapes also? (I tried to see if it would work, but the area calculations were not correct)

0 Likes
Message 12 of 14

salman_majgaonkar
Contributor
Contributor
Please upload the DWG sample.
0 Likes
Message 13 of 14

pbejse
Mentor
Mentor
Curious, Why the need for Geometric Center lowingersteven?
0 Likes
Message 14 of 14

Anonymous
Not applicable

Just because I need the location of the objects in a table form, so I chose the geometric center as a unique identifier for each one

0 Likes