Search the Community
Showing results for tags 'lisp linetype'.
Hi, I found this online and it works. But the out put is different to what the Engineer/Client is looking for. Chainage prints out at '100', '200' -----> '1100', '1200' etc. Im looking for Chainage to print out 'ch 0+100', ' ch 0+200' -----> 'ch 1+100', 'ch 1+200' Any help would be great even to point me in the wright direction on how to do this. I have attached the Lisp which works here. (defun c:CHAINTXT ( / ) (Chainage_text)) (defun Chainage_text (/) (vl-load-com) (setq ss (ssget) count 0 dist 100.0 offset 5 height 2.5 ) (repeat (sslength ss) (setq ent (ssname ss count) obj (vlax-ename->vla-object ent) chainage dist ) (while (and (setq point1 (vlax-curve-getPointAtDist obj chainage)) (setq point2 (vlax-curve-getPointAtDist obj (+ chainage 0.1))) ) (setq bearing (+ (angle point1 point2) (/ PI 2.0))) (entmake (append '((0 . "LINE") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine")) (list (cons 10 (polar point1 bearing offset))) (list (cons 11 (polar point1 (+ bearing PI) offset))) '((210 0.0 0.0 1.0)) ) ) (entmake (append '((0 . "TEXT") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbText")) (list (cons 10 (polar point1 (+ bearing PI) (* offset 2.0)))) (list (cons 40 height)) (list (cons 1 (rtos chainage 2 3))) (list (cons 50 (+ bearing PI))) '((41 . 1.0) (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 0.0 0.0 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 0)) ) ) (setq chainage (+ chainage dist)) ) (setq count (1+ count)) ) )
Hi All, Generally for drawing cable, I use a p-line (generally curve or spline fit) and change my global width to the diameter of that cable. This is usually exactly what I need to show. HOWEVER, when a complicated drawing arises with several different types of cable in one particular area, I have to differentiate the cables by altering their appearance for ease of tracing that wire in a black and white printout. Before, I would offset the polyline to either side, close in the ends and fill with a hatch. This works ok, but is time consuming and the hatch doesn't rotate relative to the line. I tried to be clever with the express tools linetype creator, but autocad won out. See Pic for my attempt. It looks ok zoomed out (except for the dots in the center of the line, which need to go). However, when zoomed in, the curve is actually an assembly of straight segments that overlap on the inside and don't meet up on the outside of the curve. Can someone point me in the right direction for instructions, tips, pointers for creating "bending" linetypes? I've already accepted that I'm probably going to have to somewhat learn lisp... hit me with it. Thanks! Kyle