|
|
#1 |
|
Forum Deity
![]() ![]() ![]() ![]() ![]() |
I think I've seen it before, but basically it's a LISP that creates the mitered 90° and 45° (well, any angle ° for that matter) Pipe symbol for single line plan view on a PLINE. Attached in the image shows an example, when you draw the PLINE it puts the corresponding symbol along the run at each angle run (highlighted in Yellow). Anyone know where I can find it? Once again, greatly appreciated to anyone who can lend a helping hand.
![]() |
|
Tannar Frampton | Venture Mechanical - Dallas, TX
Engineering/Construction department | AutoCAD MEP 2010 / Revit MEP 2010 |
|
|
|
|
|
|
#2 | |
|
Super Member
![]() ![]() ![]() ![]() |
Quote:
hope it will get you started C'mon would't to be lazy ![]() Code:
(defun C:demo(/ ang1 ang2 points elist endang tick p1 p1r p1u p2 p2r p2u
p3 p4 pline pmid pt1 pt2 startang)
(setvar 'osmode 0)
(setvar 'cecolor "blue")
(setvar 'plinewid 0)
(command "._pline")
(while (= 1 (logand 1 (getvar 'cmdactive)))
(command pause))
(setq pline (entlast)
points (vl-remove-if
(function not)
(mapcar
(function (lambda (x)
(if (= 10 (car x))
(cdr x))))
(setq elist (entget pline))
)
)
tick 25.4 ;<-- ticks length
)
(setq startang (angle (car points) (cadr points))
endang (angle (nth (- (length points) 2) points) (last points))
)
(setq p1 (polar (car points) (+ startang (/ pi 2)) (/ tick 2))
pmid (mapcar (function (lambda (a b) (/ (+ a b) 2)))
(car points)
p1)
p2 (polar pmid (+ startang pi) (/ tick 8))
p4 (polar (car points) (- startang (/ pi 2)) (/ tick 2))
pmid (mapcar (function (lambda (a b) (/ (+ a b) 2)))
(car points)
p4)
p3 (polar pmid startang (/ tick 8))
)
(setvar 'cecolor "cyan")
(command "_spline" p1 p2 p3 p4 "" p1 p4 "")
(setq p1 (polar (last points) (+ endang (/ pi 2)) (/ tick 2))
pmid (mapcar (function (lambda (a b) (/ (+ a b) 2)))
(last points)
p1)
p2 (polar pmid (+ endang pi) (/ tick 8))
p4 (polar (last points) (- endang (/ pi 2)) (/ tick 2))
pmid (mapcar (function (lambda (a b) (/ (+ a b) 2)))
(last points)
p4)
p3 (polar pmid endang (/ tick 8))
)
(command "_spline" p1 p2 p3 p4 "" p1 p4 "")
(setvar 'cecolor "yellow")
(while (> (length points) 2)
(setq ang1 (+ (angle (car points) (cadr points)) pi)
ang2 (angle (cadr points) (caddr points))
pt1 (polar (cadr points) ang1 tick)
p1u (polar pt1 (+ ang1 (/ pi 2)) (/ tick 2))
p1r (polar pt1 (- ang1 (/ pi 2)) (/ tick 2))
pt2 (polar (cadr points) ang2 tick)
p2u (polar pt2 (+ ang2 (/ pi 2)) (/ tick 2))
p2r (polar pt2 (- ang2 (/ pi 2)) (/ tick 2))
)
(setvar 'plinewid (/ tick 8))
(command "._pline" "_non" p1u "_non" p1r "")
(command "._pline" "_non" p2u "_non" p2r "")
(setq points (cdr points))
)
(princ)
)
|
|
|
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)
|
||
|
|
|
|
|
#3 |
|
Forum Deity
![]() ![]() ![]() ![]() ![]() |
Hmmm, this just might work. I downloaded it and already made a few adjustments for it to work exactly how I need... I just need to store the OSMODE and restore it when the command ends, then get an error handler in there. I won't touch the rest till Monday when I get back to work.
Actually, let me work on this, and I'll post my finished code revisions when I'm done. This actually is a great learning opportunity for me.... thanks for the help. I think I can take this and finish it up. This is great learning for me too. I'll check back in Monday ![]() |
|
Tannar Frampton | Venture Mechanical - Dallas, TX
Engineering/Construction department | AutoCAD MEP 2010 / Revit MEP 2010 |
|
|
|
|
|
|
#4 | |
|
Super Member
![]() ![]() ![]() ![]() |
Quote:
![]() Cheers ![]() ~'J'~ |
|
|
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)
|
||
|
|
|
|
|
#5 |
|
Forum Deity
![]() ![]() ![]() ![]() ![]() |
Well, I can do a little "code monkeying" but I'm definitely no programmer. The best LISP routine I've ever made myself was about 6 lines, lol. Anyways, about to head out of town for the weekend, I'm sure when I'm back Monday I'll have some questions.... Thanks again.
|
|
Tannar Frampton | Venture Mechanical - Dallas, TX
Engineering/Construction department | AutoCAD MEP 2010 / Revit MEP 2010 |
|
|
|
|
|
|
#6 | |
|
Super Member
![]() ![]() ![]() ![]() |
Quote:
I'll do it completely ![]() ~'J'~ |
|
|
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)
|
||
|
|
|
|
|
#7 | |
|
Full Member
![]() ![]() |
Quote:
Sorry to report, this is what I get.... Command: demo ._pline Specify start point: Current line-width is 0.0000 Specify next point or [Arc/Halfwidth/Length/Undo/Width]: Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: Command: ; error: bad argument type: 2D/3D point: nil blue lines, nothing else ![]() |
|
|
|
|
|
|
#8 | |
|
Super Member
![]() ![]() ![]() ![]() |
Quote:
![]() I can't change it right now, sorry Will be do it later ~'J'~ |
|
|
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)
|
||
|
|
|
|
|
#9 | |
|
Super Member
![]() ![]() ![]() ![]() |
Quote:
~'J'~ |
|
|
The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)
|
||
|
|
|
|
|
#10 |
|
Full Member
![]() ![]() |
sorry, something still a miss... nothing but blue lines again
![]() Command: pipe ._pline Specify start point: Current line-width is 0.0000 Specify next point or [Arc/Halfwidth/Length/Undo/Width]: Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: Command: bad argument type: 2D/3D point: nil._undo Current settings: Auto = On, Control = All, Combine = Yes Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: _E Command: |
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lisp to add & total every line/pline on a layer?? | StykFacE | AutoLISP, VBA, the CUI & Customisation | 7 | 14th Nov 2009 01:24 am |
| lisp to put text with pline leangth above line | chelsea1307 | AutoLISP, VBA, the CUI & Customisation | 28 | 2nd Jun 2009 02:48 pm |
| LISP to join many lines to a single 3D Pline | Phiphi | AutoLISP, VBA, the CUI & Customisation | 3 | 5th Feb 2009 04:07 am |
| Need a code lisp sum the length of line, pline, arc.. | Nad SK | AutoLISP, VBA, the CUI & Customisation | 2 | 4th Dec 2008 08:53 am |
| continuous pline lisp | cadamrao | AutoCAD General | 1 | 21st Jan 2008 10:51 am |