Jump to content

Time-Saving Piping LISP


Lee Mac

Recommended Posts

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 by Lee Mac
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :oops:

 

I have hence updated my first post to include code to create the necessary layers. :)

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :D

 

Good Luck!

Link to comment
Share on other sites

  • 2 years later...
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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...