Jump to content

Recommended Posts

Posted (edited)
23 hours ago, dlanorh said:

 

No, it will not work properly if the drawing is in feet or inches, as it assumes metres. The same applies to a drawing in millimetres as everything will be out by a factor of 1.0e6 (million). It can be altered to ask for the base units or assume the base units from system variables. The latter however assumes the drawing was initially set up correctly. The lisp can be adjusted  to account for these possibilities as it is just converting areas. The loss of the dcl is not important as I think it was used to put the area (as text) in the center of polyline.

 

Out of interest what are you using this lisp for, as there are several that allow multiple closed polylines to be selected e.g. Lot labelling or room labelling etc.?

i'm using this lisp to calculate the area of the closed spaces on the fly while drafting or doing calculations. 

i would be great if lisp would account for the units of the dwg it's being used in, then it would be a very useful.

Edited by xpr0
Posted
6 hours ago, xpr0 said:

i'm using this lisp to calculate the area of the closed spaces on the fly while drafting or doing calculations. 

i would be great if lisp would account for the units of the dwg it's being used in, then it would be a very useful.

 

OK. What "options" do you want apart from sqm <=> sqft and sqmm <=> sqins or combinations thereof (e.g. acres,hectares,sqyds)

Posted
7 hours ago, xpr0 said:

thanks for the suggestion, 'll look into it. 

You can simply download the AreaTester app directly from the cadtutor website.

Posted (edited)
4 hours ago, dlanorh said:

 

OK. What "options" do you want apart from sqm <=> sqft and sqmm <=> sqins or combinations thereof (e.g. acres,hectares,sqyds)

thanx once again for taking interest in this. 

i think 95% of the times i'll need the area to be in sqm and sqft. 

my request is that, lisp should work regardless of the  dwg units, whether units are m, mm, feet, inch etc... lisp should show the area in sqm and sqft. 

and one more thing its not a big issue, you can ignore this if you want, when clicking into a closed space & if there is a rectangle or any other shape present in it then it doesn't detect it and counts its area as well. unlike the island detection in hatch command.

Edited by xpr0
Posted
1 hour ago, xpr0 said:

thanx once again for taking interest in this. 

i think 95% of the times i'll need the area to be in sqm and sqft. 

my request is that, lisp should work regardless of the  dwg units, whether units are m, mm, feet, inch etc... lisp should show the area in sqm and sqft. 

and one more thing its not a big issue, you can ignore this if you want, when clicking into a closed space & if there is a rectangle or any other shape present in it then it doesn't detect it and counts its area as well. unlike the island detection in hatch command.

 

OK, I think the island detection/non detection is controllable, but it may not be possible. I should have time over the next couple of days, as I won't be needed to assist with the current "work spasm".

Posted
On 11/6/2020 at 12:35 AM, dlanorh said:

 

OK, I think the island detection/non detection is controllable, but it may not be possible. I should have time over the next couple of days, as I won't be needed to assist with the current "work spasm".

dlanorah did u make changes to this lisp so that it would work in all dwgs.

plz reply.

Posted
2 hours ago, xpr0 said:

dlanorah did u make changes to this lisp so that it would work in all dwgs.

plz reply.

Yes, but can't post until later. May need tweaking.

  • Like 1
Posted

Ok, attached. I've re-written the lisp, which seems to work in all cases I've manufactured, but there could be some I've missed. Areas are calculated in sqm and sqft or vice versa if the drawing is imperial, and should work for inches, feet, yards and miles (imperial) or millimetres,centimetres, decimetres, metres or kilometres. It checks the measurement and insunits system variables. If there are any discrepancies (one is imperial and the other metric it asks you to run the "-dwgunits" command as this will allow descrepancies to be changed and scaled.

 

Any problems let me know.

 

 

arec.lsp

  • 2 weeks later...
Posted
On 11/10/2020 at 8:40 PM, dlanorh said:

Ok, attached. I've re-written the lisp, which seems to work in all cases I've manufactured, but there could be some I've missed. Areas are calculated in sqm and sqft or vice versa if the drawing is imperial, and should work for inches, feet, yards and miles (imperial) or millimetres,centimetres, decimetres, metres or kilometres. It checks the measurement and insunits system variables. If there are any discrepancies (one is imperial and the other metric it asks you to run the "-dwgunits" command as this will allow descrepancies to be changed and scaled.

 

Any problems let me know.

 

 

arec.lsp 4.18 kB · 4 downloads

sorry for the delayed response, was away from work, thanx alot for this effort, 

i tried it, its not showing the correct result for meter dwg, but working fine with inches dwg, plz take a look. 

Posted
2 hours ago, xpr0 said:

sorry for the delayed response, was away from work, thanx alot for this effort, 

i tried it, its not showing the correct result for meter dwg, but working fine with inches dwg, plz take a look. 

 

Can you provide a drawing in AutoCAD 2012 format or earlier where it doesn't work and why it isn't showing the correct result. I should be able to look at it tomorrow when I return.

Posted (edited)
On 11/21/2020 at 7:53 PM, dlanorh said:

 

Can you provide a drawing in AutoCAD 2012 format or earlier where it doesn't work and why it isn't showing the correct result. I should be able to look at it tomorrow when I return.

Here is the sample dwg in which, its showing wrong results. 

 

SAMPLE DWG.dwg

Edited by xpr0
  • 4 months later...
Posted
On 11/23/2020 at 11:00 PM, dlanorh said:

 

OK. Attached is correct lisp. Entirely my fault. :facepalm::cry:

arec(1).lsp 4.19 kB · 5 downloads

hello everyone , i just want some small changes in this lisp, when it displays the results, its adds 2 extra line in the end. 

1st is "Regenerating model. " & 

2nd is "Command:" 

IMG_20210325_234430_compress10.thumb.jpg.2fd9f35aaa6804681772d731401dda2a.jpg

i want these removed bcz it pushes the results two rows up & i've to hit F2 every time i want to see the result. 

it should look like this. 

IMG_20210325_234508_compress62.thumb.jpg.d8ba3770dd0b29e50c1846528df83e60.jpg

Posted

Putting a semicolon (;) in front of the line 

  (vla-regen c_doc acactiveviewport)

may give you the result you want. 

 

Untested as I'm not sure a regen is needed there.

  • Thanks 1
Posted
17 hours ago, tombu said:

Putting a semicolon (;) in front of the line 


  (vla-regen c_doc acactiveviewport)

may give you the result you want. 

 

Untested as I'm not sure a regen is needed there.

thanx, it worked.

Posted (edited)
On 11/23/2020 at 11:00 PM, dlanorh said:

 

OK. Attached is correct lisp. Entirely my fault. :facepalm::cry:

arec(1).lsp 4.19 kB · 9 downloads

i want to ask one more thing, when i click inside the object to get its area it gets filled with solid hatch pattern see image below. 

IMG_20210327_160831.thumb.jpg.984f05ac0d20d5a79c0d9d8e4efa5c2f.jpg

****

how to change it to ANSI31 or ANSI32 hatch pattern like this 👇IMG_20210327_160757.thumb.jpg.aa107781768c29a1c22ef640ff295cf1.jpg

 

Edited by xpr0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...