viviancarvalho Posted April 27, 2010 Posted April 27, 2010 To all of the HVAC guys on Cadtutor Does anyone has a lisp to draw a branch duct. Thanks in advance Vivian Quote
fixo Posted April 27, 2010 Posted April 27, 2010 Try this out (defun C:BDUCT (/ ang1 ang2 ent1 ent2 ent3 ep1 ep3 ipt1 ipt2 ipt21 mp1 mp3 obj1 obj2 obj3 pt1 pt2 pt3 sp1 sp3) (setq ent1 (entsel "\nSelect first line >>") ent2 (entsel "\nSelect second line >>") ent3 (entsel "\nSelect third line >>") obj1 (vlax-ename->vla-object (car ent1)) obj2 (vlax-ename->vla-object (car ent2)) obj3 (vlax-ename->vla-object (car ent3)) ) (setq sp1 (vlax-curve-getstartpoint obj1) ep1 (vlax-curve-getendpoint obj1) mp1 (mapcar (function (lambda (a b) (/ (+ a b) 2))) sp1 ep1) sp3 (vlax-curve-getstartpoint obj3) ep3 (vlax-curve-getendpoint obj3) mp3 (mapcar (function (lambda (a b) (/ (+ a b) 2))) sp3 ep3) ipt1 (vlax-invoke obj1 'intersectwith obj3 0) ipt2 (vlax-invoke obj2 'intersectwith obj3 0) ang1 (angle ipt1 mp1) ang2 (angle ipt2 ipt1) pt1 (polar ipt1 ang1 100) pt2 (polar ipt2 ang1 100) pt3 (polar ipt1 ang2 100) ) (command "_.break" ent1 "f" "_non" pt1 "_non" ipt1) (command "line" "_non" pt1 "_non" pt2 "") (command "line" "_non" pt1 "_non" pt3 "") (princ) ) ~'J'~ Quote
viviancarvalho Posted April 27, 2010 Author Posted April 27, 2010 Thanks Fixo It works very well. Quote
stevesfr Posted April 27, 2010 Posted April 27, 2010 Thanks FixoIt works very well. doesn't work for me... using vanilla acad2008 what are your settings, units, scale, etc. the "fillet" goes way off and too large thx s Quote
viviancarvalho Posted May 5, 2010 Author Posted May 5, 2010 doesn't work for me...using vanilla acad2008 what are your settings, units, scale, etc. the "fillet" goes way off and too large thx s Steve Sorry for the late reply. I m using AutoCad 2010. with metric (mm) units It works very well for me but does not works with my colleague who is using 2008. Are you also into HVAC ?? Quote
stevesfr Posted May 5, 2010 Posted May 5, 2010 Steve Sorry for the late reply. I m using AutoCad 2010. with metric (mm) units It works very well for me but does not works with my colleague who is using 2008. Are you also into HVAC ?? I'm not into HVAC, I thought if I could understand and get it to work, I'd pass it onto some of my lisp challenged HVAC colleagues a few desks over. I'm using ac2008, I guess that is why it "tilts". regards, S Quote
fixo Posted May 5, 2010 Posted May 5, 2010 I'm not into HVAC, I thought if I could understand and get it to work, I'd pass it onto some of my lisp challenged HVAC colleagues a few desks over. I'm using ac2008, I guess that is why it "tilts".regards, S I tested it on A2008 (eng) with metric only - it's working good on my machine, FYI ~'J'~ Quote
stevesfr Posted May 5, 2010 Posted May 5, 2010 I tested it on A2008 (eng) with metric only -it's working good on my machine, FYI ~'J'~ I agree with the above, but when using inch or feet units on the drawing, the "fillet" is HUGE !! and way out of proportion ! S Quote
viviancarvalho Posted May 6, 2010 Author Posted May 6, 2010 Has anyone come across a lisp to draw a VCD (Volume Control Damper) Quote
Lee Mac Posted May 6, 2010 Posted May 6, 2010 Perhaps check some of my earlier links - or this? Quote
ashokdangol07 Posted June 23, 2016 Posted June 23, 2016 doesnt work for me... there is no error still... what to do? 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.