emadageeb Posted May 6, 2011 Share Posted May 6, 2011 (edited) I am working on urban planning i have a big project with huge numbers of plots and i need a lisp for numbering a closed plots which t draw it by lines and extract the area with the same number to a tabe in autocad so can some one please help me by a lisp so i can only click on area Edited May 6, 2011 by emadageeb Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted May 6, 2011 Share Posted May 6, 2011 This would sould like a fun community project to do. I'm thinking about closed polylines for plots. Not lines. You can get the area of the closed polyline easier. Quote Link to comment Share on other sites More sharing options...
emadageeb Posted May 6, 2011 Author Share Posted May 6, 2011 ok can i convert lines first by same lisp to pltyline then extract area Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted May 6, 2011 Share Posted May 6, 2011 What Acad Version do you have? If you have 2008 or higher you can create a border polyline for each plot. Type in the command line "_BPOLY" and click on the button for selecting a point in the area to be bordered. Today I was coding a bit to see what would work to create a program to collect the information and be able to list the size of the plots. It's a bit future oriented, which means you could use it for other projects as long as the drawing always had the plots as polylines. Quote Link to comment Share on other sites More sharing options...
emadageeb Posted May 6, 2011 Author Share Posted May 6, 2011 i am using autocad 2008 & thanhs for _bploy command also if i have polyline i still asking for numbering plots and get area in a table by clicking pick point Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted May 6, 2011 Share Posted May 6, 2011 About tenn years ago I programmed a room schedule in AutoLisp. Let me take a look this weekend if that will help you. Quote Link to comment Share on other sites More sharing options...
emadageeb Posted May 6, 2011 Author Share Posted May 6, 2011 thank's for your concern (LibertyOne) & iam waitting for you:) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 7, 2011 Share Posted May 7, 2011 (edited) I had some fun writing this, maybe it will help you: See later post for latest code Edited May 9, 2011 by Lee Mac Quote Link to comment Share on other sites More sharing options...
stevesfr Posted May 7, 2011 Share Posted May 7, 2011 Lee, can't get this to work. makes start of table, labels first area and then this Command: at Pick Point for Table: Pick Area: ** Error: Automation Error. Not applicable ** using Acad2008 vanila entities are LWpoly, textsize set ok Steve Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 7, 2011 Share Posted May 7, 2011 Hi Steve, Thanks for the feedback - I'm thinking this is a version issue since (as demonstrated by the gif), I have no problems with the code (on closed LWPolylines and Circles at least). Would you possibly be able to tell me the line at which the code crashes? (Open VLIDE, Ctrl+O (Open File), Open the above program, Debug->Break on Error (Ticked), Ctrl+Alt+E (Load Code), Run the program in ACAD -> on crash: Debug->Last Break Source (Ctrl+F9), note the line number of the highlighted code segment. Reset the Error (Ctrl+R). Thanks! Lee Quote Link to comment Share on other sites More sharing options...
stevesfr Posted May 7, 2011 Share Posted May 7, 2011 Lee, did so... lisp tilts on (vla-put-rows tb 3) which was highlighted...... HTH I'd be happy to test more to help fix. Steve Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 7, 2011 Share Posted May 7, 2011 Lee, did so... lisp tilts on(vla-put-rows tb 3) which was highlighted...... HTH I'd be happy to test more to help fix. Steve Argh! - that's a royal shame if that line doesn't work in 2008 since I really like the way rows are added to the table in real-time (instead of creating the table after the user has finished picking areas). Thanks for testing it Steve, appreciated. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 7, 2011 Share Posted May 7, 2011 (edited) It still won't fix the error, but maybe this will be of use to you since I can't seem to get the table part to work. See later post for latest code Lee Edited May 9, 2011 by Lee Mac Quote Link to comment Share on other sites More sharing options...
stevesfr Posted May 7, 2011 Share Posted May 7, 2011 It still won't fix the error, but maybe this will be of use to you since I can't seem to get the table part to work. Lee AF part works fine. Then cut and paste text file back to Acad, and presto, immation table ! thanks for efforts Lee those who can use AreaTable will have one of your best. Steve Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 7, 2011 Share Posted May 7, 2011 Neat idea Lee. Tested in C3D 2011. Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted May 7, 2011 Share Posted May 7, 2011 Oh boy, Lee Mac, you really did a good job on that. Like I said in a post before, I programmed a room schedule about ten years ago for Version 14. I was just sifting through my code today and it would be tedious to go through it all and rewrite some of it because it's interlaced with blocks and specific layer names. I like the simplicity of your programming style which gets to the point rather quickly. I seemed to have gone the complex route. I can't test anything over the weekend because I have no access to AutoCAD. I just have my AutoLisp files. My idea was to build up the program within the CADTutor community and have everyone gain a bit on learning to build up a program like this. But it also seems that the thread starter wanted something rather quick. Quote Link to comment Share on other sites More sharing options...
emadageeb Posted May 7, 2011 Author Share Posted May 7, 2011 i tried areatable lisp in AUTOCAD 2008 os win 7 but i have this messege ** Error: Automation Error. Not applicable ** could some one help me Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 7, 2011 Share Posted May 7, 2011 i tried areatable lisp in AUTOCAD 2008 os win 7 but i have this messege ** Error: Automation Error. Not applicable ** could some one help me So try AreaLabel in post No # 13 Quote Link to comment Share on other sites More sharing options...
emadageeb Posted May 7, 2011 Author Share Posted May 7, 2011 also arealabel cannot work with me Unknown command "AREALABEL". Press F1 for help. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 7, 2011 Share Posted May 7, 2011 AF part works fine. Then cut and paste text file back to Acad, and presto, immation table !thanks for efforts Lee those who can use AreaTable will have one of your best. I'm glad that part works for you - its just a shame the 'rows' property throws a wobbly even though it is a read/write property. Thanks anyway Steve. Neat idea Lee. Tested in C3D 2011. Cheers Alan - I take it the table part works for you OK in Civil3D? Oh boy, Lee Mac, you really did a good job on that. Like I said in a post before, I programmed a room schedule about ten years ago for Version 14. I was just sifting through my code today and it would be tedious to go through it all and rewrite some of it because it's interlaced with blocks and specific layer names. I like the simplicity of your programming style which gets to the point rather quickly. I seemed to have gone the complex route. I can't test anything over the weekend because I have no access to AutoCAD. I just have my AutoLisp files. My idea was to build up the program within the CADTutor community and have everyone gain a bit on learning to build up a program like this. But it also seems that the thread starter wanted something rather quick. Thanks LibertyOne - with my programming, I try to keep things short and simple I suppose a community project would be beneficial to help those learning, however it would need some coordination and structure (we tried something similar recently at theSwamp). i tried areatable lisp in AUTOCAD 2008 os win 7 but i have this messege ** Error: Automation Error. Not applicable ** could some one help me This would be the error that stevesfr reported earlier - have a read of the other posts in the thread. It appears to be a Version related issue. also arealabel cannot work with me Unknown command "AREALABEL". Press F1 for help. The command is not 'arealabel' - this is just a subfunction. The commands are printed at the command-line upon loading the program. Regards, Lee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.