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
;
;=========================================================================================
Bookmarks