Autocad Contour Lisp
Tough Questions - Drawing Contours and Contour Labeling Lisp Needed AutoCAD 2007 I have a quite a few tough questions/requests and I am currently looking for some lisps to solve them. Harakteristika na medsestru dlya nagrazhdeniya obrazec. I have been doing some searching online to find the lisps I need, and although I have been able to find some stuff, I still have some things that I can't seem to find exactly what I am looking for. I would like to take the opportunity ahead of time to thank every who views my questions and for any help that is given. 1.) Wondering what is the easiest way to cad draw contours on a site plan, is the polyline tool the best thing to use? 2.) I am looking for a lisp that can label contours with their elevation in a specific way.
AutoLISP: External Contours of Objects Posted on March 29, 2012 by AutoCAD Tips This routine is helpful if you have overlapping objects that form a closed area and you would like to combine them into one overall closed object.
What I need is a lisp that uses the 'current' textstyle selected for text size of label. The lisp starts off asking the user to click a point to select a starting point of contour label and then asks for a second point to specify the text labels angle. Then the lisp asks the elevation of the contour to be entered. Now for the tough part, I need the lisp to then place the contour label above the contour in a rectangle created with the 'TCIRCLE' command with an offset factor of.20 with the two bottom points of the rectangle lining up with the contour (which is based on the two points clicked in the beginning of the lisp).
I have included a cad drawing file for an example of what I am looking for. 3.) I am also looking for the exact same lisp above for question two, but instead of having to enter an elevation by manually typing it in, the lisp asks you to select the contour line and it takes the 'Z' elevation assigned to the contour line you select. Who is up for the challenge? Code: (defun alg-ang (obj pnt) (angle '(0. 0.) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj pnt ) ) ) ) (defun C:LAB(/ ang angp box dv en ent p1 p2 p3 p4 pt txten txthgt txtpt wid zstr zvalue) (setvar 'osmode' 512) (setq txthgt 3.2);>')) (progn (setq en (car ent)) (while (setq pt (getpoint ' nPick a point on the contour (or press Enter to Exit) >> ')) (setq pt (vlax-curve-getclosestpointto en pt) zvalue (caddr pt) zstr (rtos zvalue 2 0) dv (vlax-curve-getfirstderiv en (vlax-curve-getparamatpoint en pt)) ang (alg-ang en pt) ang (cond ((. Wow, that is exactly what I was looking for. I don't know if you wrote that specifically for me or if you found that, but it really means a lot.
I really appreciate your help. That is a very impressive lisp created. Can you tell me what in the lisp makes the rectangle size around the text. On some of my drawings I may use different fonts which may conflict a little with the rectangle when printed. If I could edit the size of the rectangle that would be great. But again I thank you a great deal for your help.