bmw1789 Posted September 18, 2014 Posted September 18, 2014 I am sure there is a way, whether it be lisp routine, or feature already within autocad, but I have yet to find it. What I want to do is be able to take a point that represents a grade and determine the elevation along a line to another point representing a lower or higher grade. Typically I would get the measurement between the points and just do the math. It would be great if you could select a point..be prompted to select (+ or -) and then enter a percentage, and then when you end the line it gives you a + number or a -number in which represents the rise or fall from point A to B. To take it a step further, not that I really need it, but would be cool, is if you could select points along that line and it give you an elevation for that point. Does anyone have any suggestions, or know of a lisp routine that does exactly this, and something similar. It would be huge in my career if such thing exists or can exist. Please point me in the right direction if you you of anything!!! Thank you, Matt Quote
ReMark Posted September 18, 2014 Posted September 18, 2014 Your profile says you are using AutoCAD LT. LT does not support lisp. Is your profile wrong? Quote
steven-g Posted September 18, 2014 Posted September 18, 2014 It sounds like it should be possible, as a macro, could you provide a dwg showing what you would hope to achieve. Quote
bmw1789 Posted September 19, 2014 Author Posted September 19, 2014 Yes I will later tonight when I get back home. If u could work it out in a macro that would be even better. I do most work in LT however we will be upgrading to 2015 very soon and I am trying to get into the lisp stuff. Quote
bmw1789 Posted September 19, 2014 Author Posted September 19, 2014 It sounds like it should be possible, as a macro, could you provide a dwg showing what you would hope to achieve. I was able to get something thrown together to try and explain what I am need/wanting. Hopefully you can help me out with this! GRADE SLOPE CALC MACRO HELP.pdf Quote
steven-g Posted September 19, 2014 Posted September 19, 2014 Is the second point on the grade or plan. I have never worked with survey data, but I know it makes a difference to measurements. Quote
steven-g Posted September 19, 2014 Posted September 19, 2014 Try this block, when you first insert it you can input the grade and the starting height, once inserted click on the block and drag the end to where you need it, there is also a downward pointing blue arrow (vivibility selection grip) this will allow you to choose between plus and minus. You will need to do a regen before it updates and you also need to stretch that end point at least once before the value shows correctly. I hope that I understood how grades work please try it and let me know how it performs. grade.dwg Quote
bmw1789 Posted September 19, 2014 Author Posted September 19, 2014 That is amazing!! it works really well.. Is it possible to come up with one very similar in which you put in both the starting elevation, and then ending elevation and it give you the percentage of the slope? You exceeded my expectations on this last one! I Need to find my list of things that I wish were tools in autocad and throw them at you and see what you can come up with... Quote
bmw1789 Posted September 19, 2014 Author Posted September 19, 2014 PRECISELY!!! you just made my year! I am in my second year as a landscape architect..Pretty much right out of college, and grading was always so time consuming. This is absolutely amazing! How do I go about smoothing out the tool to get the text to line up at the same point every time, as well as, making the text match our office standards? *also...since I am still trying to figure out the dynamic block/macro thing. How can I create a shortcut for this tool? Is that even possible? I seriously have thought of so many different tools that I wish I could use that I know are possible with dynamic blocks but have given up on them because I waste to much time trying to make them with no success. I may be requesting your expertise often. Quote
bmw1789 Posted September 19, 2014 Author Posted September 19, 2014 Also...something I just noticed. Since you created this using engineering as your drawing units, it will not translate if used in an architectural unit drawing. Does it have to be created in architectural units for this to work? I tried scaling it up by 12 which is what we do when we receive files from engineers but the units stay the same when i scale the block up? Quote
BIGAL Posted September 19, 2014 Posted September 19, 2014 (edited) If you want to do a list of things then Lisp is the way to go whilst stevens block is really good you will find it easier to just write a little program, enter grade +/- pick pt1 pock pt2 draw label. If you want label 2 pts existing this is inbuilt in Civ3d. As you say if you go to Autocad not LT ; heres a chopped down version for testing (defun c:slopez ( / pt1 pt2 and dist x1 x2 y1 y2 z1 z2) (setq pt1 ( getpoint "\nPick first point ")) (setq pt2 (getpoint pt1 "\nPick second point " )) (setq slope (getreal)) (setq x1 (car pt1)) (setq y1 (cadr pt1)) (setq z1 (caddr pt1)) (setq x2 (car pt2)) (setq y2 (cadr pt2)) (setq z2 (caddr pt2)) (setq dist (distance pt1 pt2) ; may need pythagoras here if 2 pt Z is included (setq rise (* (/ slope 100.0) dist)) (setq newz (+ z1 rise)) (setq ang (angle pt1 pt2)) (setq diff (- newz z2)) (princ (strcat "The new z is " (rtos diff 2 3))) ; do maybe text or leader now with label ) (C:slopez) Edited September 20, 2014 by BIGAL Quote
bmw1789 Posted September 20, 2014 Author Posted September 20, 2014 Can someone please explain to me how the block above was actually created? I think if I knew how to actually create these I could make around 20 that would be similar but all used to different joba. If I knew a process and spent some time disecting it a little I could really benefit from them. I really really really want to learn how to do this. Quote
steven-g Posted September 20, 2014 Posted September 20, 2014 The text style used in the block is called 1:1 if you open the text style manager and alter that to match your own standards it should change the block. Open the block in the block editor and move the text to how you would like to align it near the end of the lines, at the moment the text moves with the end of the line and so long as you don't move it far there shouldn't be a problem. It works using 3 attributes "height" and "heightb" are just the two heights that you input for your ground levels, there is also a linear parameter that is used to work out the grade. The third attribute "grade" does the math with the formula:- (rise/distance)*100 Open the block editor and try to see how things are put together, I'll do you a break down step by step, but that will be next week. Imp.dwg Quote
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.