+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default ANSI B16.47 Flanges Lisp

    Registered forum members do not see this ad.

    Hello Everyone,

    Here is another entmake program that creates ANSI B16.47 Flanges fast. A portion of this program was from Afralisp and modified with better error trapping and external data entries. Thanks to Lee on that as well as the list boxes. This program also has built-in instructions. The program will allow you to switch insertion point locations to install the flanges either to a pipe or flanges face to face without additional maneuvering. The program has a provision to insert the flange in SI units. Layer names, colors, line type and line weight can be edited to suit your standard. Flange Range: 26" thru 60".

    This program requires the following files below to work properly.
    Make sure to have these files together in the same directory.
    Also make sure the the directory is in the AutoCAD Support File Search Path.
    This program has a built-in ALERT to let you know if a DIM file is missing. (See Image Below)

    AF2.dcl - AutoCAD Dialog Definition, Size 3 KB"
    AF2.lsp - AutoLISP Application Source, Size 63 KB"
    AF2_A_150#.dim - DIM File, Size 3 KB "
    AF2_A_300#.dim - DIM File, Size 3 KB"
    AF2_A_400#.dim - DIM File, Size 3 KB"
    AF2_A_600#.dim - DIM File, Size 3 KB"
    AF2_A_900#.dim - DIM File, Size 2 KB"
    AF2_B_75#.dim - DIM File, Size 3 KB"
    AF2_B_150#.dim - DIM File, Size 3 KB "
    AF2_B_300#.dim - DIM File, Size 3 KB"
    AF2_B_400#.dim - DIM File, Size 3 KB"
    AF2_B_600#.dim - DIM File, Size 3 KB"
    AF2_B_900#.dim - DIM File, Size 2 KB"

    Give it a try and let me know how it goes.
    See attached AF2.zip below.

    Command syntax is: AF2

    You can find information here with regard to loading the program: http://www.cadtutor.net/forum/showthread.php?t=1390

    For ANSI B16.5 Flanges, Go to this thread:http://www.cadtutor.net/forum/showthread.php?t=48462

    For ASME Pressure Vessel Heads, Go to this thread:http://www.cadtutor.net/forum/showthread.php?t=47451

    Attention: Revision V2 Sept 17, 2010
    Code:
    ;/////////////////////////////////////////////////////////////////////////////////////////
    ;
    ; Do Not Remove This Header!
    ;
    ; Revisions.
    ; Note: Be sure to add the most recent revision date and version in the About Dialog Page. 
    ;-----------------------------------------------------------------------------------------
    ; Version | Change                                                              | Date
    ;-----------------------------------------------------------------------------------------
    ; V1      | Fix bad function call problem in AF2_CFV                            | 06|05|10
    ; V2      | Removed AF2_PL Program Loop function and replace with while loop    | 09|17|10
    ; XXXX    | XXXXX                                                               | XX|XX|XX
    ; XXXX    | XXXXX                                                               | XX|XX|XX
    ;
    ;/////////////////////////////////////////////////////////////////////////////////////////


    I made a section in the code for you to edit layers and linetypes. Just edit the RED highlighted sections as shown below.
    Code:
    ;=========================================================================================
    ;
    ; Note: Here you can modify Layer Names, Color, Linetype and Lineweight Below.
    ;
      (setq FLNAM "M-PROC-NOZZ")                                     ;Flange Layer Name
      (setq FLCLR 1)                                                 ;Flange Layer Color
      (setq FLTYP "Continuous")                                      ;Flange Linetype
      (setq FLWGT 35)                                                ;Flange Lineweight
      (setq CLNAM "M-PROC-NOZZ-CLIN")                                ;Center Line Layer Name
      (setq CLCLR 5)                                                 ;Center Line Layer Color
      (setq CLTYP "CENTER2")                                         ;Center Line Linetype
      (setq CLWGT 18)                                                ;Center Line Lineweight
    ;
    ; Note: The information below for the linetype is from acad.lin and acadiso.lin
    ;
      (setq CDESC "Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ ") ;Center Line Description
      (cond
        ((= DUNT "IMP")                                              ;If Imperial Units
         (setq TPL    1.125                                          ;Total Pattern Length (Imperial)
               SLEN1  0.75                                           ;Segment Length 1 (Imperial)
               SLEN2 -0.125                                          ;Segment Length 2 (Imperial)
               SLEN3  0.125                                          ;Segment Length 3 (Imperial)
               SLEN4 -0.125))                                        ;Segment Length 4 (Imperial)
        ((= DUNT "SI")                                               ;If SI Units
         (setq TPL   28.575                                          ;Total Pattern Length (SI)
               SLEN1 19.05                                           ;Segment Length 1 (SI)
               SLEN2 -3.175                                          ;Segment Length 2 (SI)
               SLEN3  3.175                                          ;Segment Length 3 (SI)
               SLEN4 -3.175)))                                       ;Segment Length 4 (SI)
    ;
    ; End of Layer Modify
    ;
    ;=========================================================================================
    Attached Images
    Attached Files
    Last edited by The Buzzard; 7th Oct 2010 at 04:08 am. Reason: Revision V2

  2. #2
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Attention All,

    I had to fix a bad function call in the program. The latest fix is now uploaded to the first post. I would also ask that you please test the program and report back any other problems you may find.

    Sorry about that.
    Please enjoy the program
    The Buzzard

  3. #3
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Attention All,

    Revision V2 has been uploaded to the first post. See Revision List for changes.

  4. #4
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    May 2011
    Posts
    1

    Default

    I can not use, position in file c:, then "load application" and write AF1 and AF2 in the command line, and I do not see anything, I get the following error
    Command: af1
    ** DCL ** File not Found

    What am I doing wrong?

    I have autocad 2008

  5. #5
    Full Member digger's Avatar
    Computer Details
    digger's Computer Details
    Operating System:
    N/A
    Computer:
    N/A
    Motherboard:
    N/A
    CPU:
    N/A
    RAM:
    N/A
    Graphics:
    N/A
    Primary Storage:
    N/A
    Secondary Storage:
    N/A
    Monitor:
    N/A
    Using
    not applicable
    Join Date
    Sep 2010
    Location
    N/A
    Posts
    47

    Default

    Registered forum members do not see this ad.

    Support File Search Path.
    Also, see another flange program.
    “Absence of evidence is not evidence of absence.” - Dr. Carl Sagan

Similar Threads

  1. ANSI B16.5 Flanges Lisp
    By The Buzzard in forum AutoLISP, Visual LISP & DCL
    Replies: 20
    Last Post: 6th Oct 2010, 07:46 am
  2. Ansi Standards
    By rio17 in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 7th Apr 2008, 05:29 am
  3. Drawing Flanges
    By Hogpaw in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 4th Nov 2006, 12:48 pm
  4. SMACNA STANDARD FLANGES
    By DANIEL in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 18th May 2006, 03:05 pm
  5. Creating flanges in Inventor 10
    By ebjco in forum Autodesk Inventor
    Replies: 3
    Last Post: 23rd May 2005, 07:22 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts