Lee Mac Posted November 9, 2008 Posted November 9, 2008 (edited) Hi All, I thought it would be beneficial to everyone if I posted a LISP I wrote a while ago that saves time when drawing piping equipment. The LISP will draw various sizes of: Pipe (plan/elevation) Flange (plan/elevation) Elbow (plan/elevation) Tee (plan/elevation) All are drawn using measurements taken from the American National Standards Institute (ANSI). I hope it is of some use. PIPE & FLANGE DRAUGHTSMAN.zip Edited February 4, 2013 by Lee Mac 2 Quote
ReMark Posted November 9, 2008 Posted November 9, 2008 That's is very generous of you Lee. I just wish you had joined CT about 2 years sooner as I really could have used something like this back then! I've been assembling my own 2D and 3D pipe fitting library over the past couple of years and have made a lot of progress but doing it using a Lisp routine probably would have made the task much easier. In any event, I'm going to give your routine a try. Much appreciated. Quote
Lee Mac Posted November 9, 2008 Author Posted November 9, 2008 Hi Guys, I found a minor error in the code of my first post. I have now updated this and uploaded the updated file. Sorry for any inconvenience. 1 Quote
feargt Posted November 9, 2008 Posted November 9, 2008 Hi Lee, as Remark said very generous indeed, was trying it out but when I am asked to enter a pipe diameter I get the following: Command: pfdraw Initialising... Select Equipment (Pipe/Flange/Elbow/Tee)p Select View (Plan/Elevation)p Select Point for Pipe Insertion Select Pipe Size (50/80/100/150/200/250): 200 ERROR Or ESC PRESSED... EXIT PIPE & FLANGE DRAUGHTSMAN by LEE McDONNELL. Command: and no I did not press escape.... I get the same when I try a flange too. any ideas what is happening here? thanks Quote
Lee Mac Posted November 9, 2008 Author Posted November 9, 2008 Hi feargt, As stated in my previous post, I modified my code slightly, as I found a slight error, and the code works OK on my machine. However, I am using AutoCAD 2004, and so, it is possible that the command prompts for some of the functions that the LISP uses are different on different versions of AutoCAD. Sorry if this doesn't resolve the problem. Quote
feargt Posted November 9, 2008 Posted November 9, 2008 had a look through the code and saw it does not create the layers, ( am I correct here?) once I created the layers manually it seemed to work then. I say seemed only as I have not tried it all out yet. Quote
Lee Mac Posted November 9, 2008 Author Posted November 9, 2008 Hi Feargt, I have been speaking to ASMI about the code, and yes, the error occurs because I have not included code to create the layers that are invoked within the LISP. As I always use a template, I unfortunately overlooked this point sorry. I have hence updated my first post to include code to create the necessary layers. Quote
Hugh_Compton Posted November 10, 2008 Posted November 10, 2008 You can also download a library of 2D ANSI pipe fittings as dynamic blocks from here: http://www.3dcadmax.com/2DPipeFittingsAutoCAD.htm Quote
Lee Mac Posted November 11, 2008 Author Posted November 11, 2008 If of use to anyone, I have updated the above LISP to include the code for a plan of a tee fixing. Quote
Tankman Posted December 2, 2008 Posted December 2, 2008 Some might like this free CD. Haven't used it in sometime but, still a free program. https://shop.charlottepipe.com/lit/category.aspx?categoryid=26&openid=26 AutoCAD 2-D 3-D Drawings, Version 3.0 $0.00 Spanish AutoCAD 2-D 3-D Drawings $0.00 Quote
Doove Posted May 27, 2009 Posted May 27, 2009 Hi Lee fantastic but of work; I'm trying to learn a bit of code but I'm not finding it too easy! My query is essentially really selfish, but basically you are using a table of actual dimensions for fittings from the ANSI standards? Is there anyway a generic and external table style, perhaps utilisng an excel sheet or access database or simple text file could be included so if anyone wanted to utilise a different standard (the BS EN eurocodes are due March 2010) they could just enter the dimensions into that list and not risk messing up your code? Or is that just not possible? Cheers Doove Quote
Lee Mac Posted May 27, 2009 Author Posted May 27, 2009 I believe this would be possible, but would need a lot more coding - and the exact format of the Excel file would need to be known - I could imagine it being very error-prone. By the way, are you using the updated version here or the one posted in this thread? Thanks for your compliments, Cheers, Lee Quote
Doove Posted May 27, 2009 Posted May 27, 2009 I'm using version 8.0 which is the latest I think(?). The reason I ask is that I'm drawing out both ductile iron and carbon steel pipe to BS EN standards from DN15 up to DN800. Perhaps it would be OK with you if, when I actually understand the code (so in a year or five...) I can adapt your lisp routine to suit? I wouldn't want to use your work without your permission. Um, how did you start off your learning curve? I'm currently doing an OU introductory course which explains the basics of HTML & Javascript but it's LISP I want to learn really, is there a good book or website, just somewhere to start really. cheers Doove Quote
Lee Mac Posted May 27, 2009 Author Posted May 27, 2009 I'm using version 8.0 which is the latest I think(?). The reason I ask is that I'm drawing out both ductile iron and carbon steel pipe to BS EN standards from DN15 up to DN800. Perhaps it would be OK with you if, when I actually understand the code (so in a year or five...) I can adapt your lisp routine to suit? I wouldn't want to use your work without your permission. Um, how did you start off your learning curve? I'm currently doing an OU introductory course which explains the basics of HTML & Javascript but it's LISP I want to learn really, is there a good book or website, just somewhere to start really. cheers Doove I really don't mind if you adapt my routine - I have posted it free on here, as, if it wasn't for the input from the guys on this site - with all their ideas - it would not be where it is today. The piping program code is not the best example of good LISP programming - it was one of the very first programs I wrote, and it is a "messy" bit of programming - not ideal to learn from. But I have kept all the dimensions for the various fittings at the very top of the program - so that they can be modified to other standards. I must admit, it has been a long time since I have looked at the program, so it would take a bit of figuring out which variable corresponded to which dimension of the fitting... As for where to start programming - I learnt from looking at the code posted on here and other sites of this nature - and referred to sites such as Jeffery Sanders and AfraLISP as a reference. Also, I would always recommend looking at a reference for all the AutoLISP functions available to you - this can be found in the Visual LISP Editor help file. (type VLIDE at the command prompt.). Hope this helps! Lee Quote
Doove Posted May 28, 2009 Posted May 28, 2009 Thanks Lee, I shall start at the bottom and work my way down... Have a good one! Doove Quote
Lee Mac Posted May 28, 2009 Author Posted May 28, 2009 Thanks Lee, I shall start at the bottom and work my way down... Have a good one! Doove I'm sure you'll be writing LISPs in no time Good Luck! Quote
sayhi_sanjay1 Posted September 12, 2011 Posted September 12, 2011 Can you Please send me the latest updated one to use in Autocad-2011 Quote
sayhi_sanjay1 Posted September 12, 2011 Posted September 12, 2011 I Have one programme its work in autocad with Dongle can you help me that i can cut that part from Lisp and use as normal cad Quote
ReMark Posted September 12, 2011 Posted September 12, 2011 Can you Please send me the latest updated one to use in Autocad-2011 Refer to post #1 where you'll find a link to the latest version of the program. Quote
ReMark Posted September 12, 2011 Posted September 12, 2011 I Have one programme its work in autocad with Dongle can you help me that i can cut that part from Lisp and use as normal cad Are you looking for a way around having to install a dongle to use a program that works inside AutoCAD? Please clarify. 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.