(ASCII Template "ADI's Single Padstack")
#Need to fix the pin one locator and this one is done.  Needs silkscreen layer added as well.
#Padstack name does not seem to work and padstack is not showing up.
#What about non plated pads, and perhaps oblong slots.
#Top and Bottom pads do not display properly.
(Version 1)
(Created 2002 02 07 12 00 00)
(Modifed 2002 02 07 12 00 00)
(Type "All")
(Standard "Non-Calculated")
(Style "Misc, Pad")
(Family "ADI_Standard")
(Revision "A1")
(Creater "Accelerated Designs, Inc.")
(Comment "Checked 5-29-04  http://www.Accelerated-Designs.com")
(Comment "KTS.  06-20-2014.  Changed template description.")
(Comment "JRR. 11-11-2014. Through Hole")
(Image "adi_TESTPOINT.gif")
(Description "This template builds a single padstack.  Pad dimensions are-entered.")
(Units Mil)
(Variables
    #Variables
    (Picture "adi_TESTPOINT.gif")
    (String "Specific Name : " 'NAME' "")
    (Comment "Part Information")
    (Check "Plated Hole: PL" 'PL' 1)
    (Comment "Pin Information")
    (StringList "Top Pad Shape" 'PSH' "Round" "Rectangle" "Square" "Oblong")
    (Number "Top Layer Pad Width X: PADWT" 'PADWT' 65)
    (Number "Top Layer Pad Height Y: PADHT" 'PADHT' 65)
    (StringList "Bottom Pad Shape" 'PSHB' "Round" "Rectangle" "Square" "Oblong")
    (Number "Bottom Layer Pad Width X: PADWB" 'PADWB' 65)
    (Number "Bottom Layer Pad Height Y: PADHB" 'PADHB' 65)
    (Number "Default Drill Size: DRL" 'DRL' 36)
    (Stringlist "Center Lead Shape" 'LEAD_SHAPE' "Round" "Rectangular")
    (Number "Max Lead X-Size: LEAD_SIZE" 'LEAD_SIZE' 0)
    (Number "Max Lead Y-Size: LEAD_SIZE_Y" 'LEAD_SIZE_Y' 0)
    (Comment "Alt Pad Style 1")
    (StringList "Pad Shape: A1_PSH" 'A1_PSH' "Oblong" "Round" "Rectangle" "Square")
    (Number "Alternate Pad Width X: A1_PADW" 'A1_PADW' 60)
    (Number "Alternate Pad Height Y: A1_PADH" 'A1_PADH' 90)
    (Number "Alternate Drill Size: A1_DRL" 'A1_DRL' 30)
    (Comment "Alt Pad Style 2")
    (StringList "Pad Shape: A2_PSH" 'A2_PSH' "Oblong" "Round" "Rectangle" "Square")
    (Number "Alternate Pad Width X: A2_PADW" 'A2_PADW' 90)
    (Number "Alternate Pad Height Y: A2_PADH" 'A2_PADH' 60)
    (Number "Alternate Drill Size: A2_DRL" 'A2_DRL' 30)
    (Comment "Documentation")
    (String "Revision Level :" 'REVLEVEL' "A0")
    #(String "PadStack Name :" 'PSNAME' "")
    (Comment "Footprint Naming")
    (String "Name Suffix SUFFIX: " 'SUFFIX' "")
    #Temporary Variables
    (Temporary String "altpadstack1" 'A1_Pad' "A1_Pad")
    (Temporary String "altpadstack2" 'A2_Pad' "A2_Pad")
    (Temporary Number "Dimension  Width: DW" 'DW' 0)
    (Temporary Number "Assembly  Width: AW" 'AW' 0)
    (Temporary Number "Silkscreen Width" 'SW' 6)
    (Temporary String "Pad Shape Letter" 'PSHL' "E")
    (Temporary String "Default padstack" 'DefPad' "EX60Y60D38")
    (Temporary Number "No Probe Horizontal " 'NPH' 850)
    (Temporary Number "No Probe Vertical" 'NPV' 850)
    (Temporary String "Padstack Name" 'PSN' "")
    (Temporary Number "Text Rotation Value: TRO" 'TRO' 0)
    (Temporary String "NNAME" 'NNAME' "")
    (Temporary Number "Temp Number for Calculations" 'TEMP_Y' 0)
    (Temporary Number "NEW PADW" 'NEW_PADW' 0)
    (Temporary Number "NEW PADH" 'NEW_PADH' 0)
    (Temporary Number "NEW DRL" 'NEW_DRL' 0)
    (Temporary Number "NEW PAD2W" 'NEW_PAD2W' 0)
    (Temporary Number "NEW PAD2H" 'NEW_PAD2H' 0)
)
(Part
    #Calculations
    ##Drill and Pad calculations for Pins
    (Script "GP_Drill_Pad_cal.vbs"
        (Variable 'LSHAPE' [String='LEAD_SHAPE'])
        (Variable 'LEAD_X' [Number='LEAD_SIZE'])
        (Variable 'LEAD_Y' [Number='LEAD_SIZE_Y'])
        (Variable 'DRILL_INC' [Number=10])
        (Variable 'PAD_INC' [Number=20])
        (ReturnValue 'NEW_DRL' 'NEW_DRL')
        (ReturnValue 'NEW_PADW' 'NEW_PADW')
        (ReturnValue 'NEW_PADH' 'NEW_PADH')
    )
    #Overwrite the variables if the lead size is set to zero.
    (Variable 'NEW_DRL' [Number='DRL']
        (DoIf [Number='LEAD_SIZE']=[Number=0])
    )
    (Variable 'NEW_PADW' [Number='PADWT']
        (DoIf [Number='LEAD_SIZE']=[Number=0])
    )
    (Variable 'NEW_PADH' [Number='PADHT']
        (DoIf [Number='LEAD_SIZE']=[Number=0])
    )
    (Variable 'NEW_PAD2W' [Number='PADWB']
        (DoIf [Number='LEAD_SIZE']=[Number=0])
    )
    (Variable 'NEW_PAD2H' [Number='PADHB']
        (DoIf [Number='LEAD_SIZE']=[Number=0])
    )
    ## Padstack Naming
    (Group "GP_PadStyleName.adg"
        (Variable 'GP_PSH' [String='PSH'])
        (Variable 'GP_PADW' [Number='NEW_PADW'])
        (Variable 'GP_PADH' [Number='NEW_PADH'])
        (Variable 'GP_DRL' [Number='NEW_DRL'])
        (ReturnValue 'DefPad' 'GP_PADNAME')
    )
    (Group "GP_PadStyleName.adg"
        (Variable 'GP_PSH' [String='A1_PSH'])
        (Variable 'GP_PADW' [Number='A1_PADW'])
        (Variable 'GP_PADH' [Number='A1_PADH'])
        (Variable 'GP_DRL' [Number='A1_DRL'])
        (ReturnValue 'A1_Pad' 'GP_PADNAME')
    )
    (Group "GP_PadStyleName.adg"
        (Variable 'GP_PSH' [String='A2_PSH'])
        (Variable 'GP_PADW' [Number='A2_PADW'])
        (Variable 'GP_PADH' [Number='A2_PADH'])
        (Variable 'GP_DRL' [Number='A2_DRL'])
        (ReturnValue 'A2_Pad' 'GP_PADNAME')
    )
    # Part Data (glue dots, origin, pickpoints, Rotation, etc.
    ## Pad Style Definitions
    (PadStyleDefinition
        (Name [String='DefPad'])
        (Drill [Number='NEW_DRL'])
        (Plated True))
        (Shape (Layer TOP) [String='PSH'] [Number='NEW_PADW'] [Number='NEW_PADH'])
        (Shape (Layer BOTTOM) [String='PSHB'] [Number='NEW_PAD2W'] [Number='NEW_PAD2H'])
        (DoIf [Number='PL']=[Number=1])
    )
    (PadStyleDefinition
        (Name [String='DefPad'])
        (Drill [Number='NEW_DRL'-'NEW_DRL'-'NEW_DRL'])
        (Plated False))
        (Shape (Layer TOP) [String='PSH'] [Number='NEW_PADW'] [Number='NEW_PADH'])
        (Shape (Layer BOTTOM) [String='PSHB'] [Number='NEW_PAD2W'] [Number='NEW_PAD2H'])
        (DoIf [Number='PL']<>[Number=1])
    )
    (PadStyleDefinition
        (Name [String='A1_Pad'])
        (Drill [Number='A1_DRL'])
        (Plated True)
        (Shape (Layer TOP) [String='A1_PSH'] [Number='A1_PADW'] [Number='A1_PADH'])
        (AlternateNumber 1)
    )
    (PadStyleDefinition
        (Name [String='A2_Pad'])
        (Drill [Number='A2_DRL'])
        (Plated True)
        (Shape (Layer TOP) [String='A2_PSH'] [Number='A2_PADW'] [Number='A2_PADH'])
        (AlternateNumber 2)
    )
    ## Pin Locations
    (Pin
        (Name [String=[Number=1]])
        (Designator [String=[Number=1]])
        (PadStyle [String='DefPad'])
        (Origin [Number=0] [Number=0])
        (Rotation [Number=0])
    )
    ## PlaceBound Description
    ### Valor Boundary Description
    (Group "GP_HP_Valor.adg"
        (Variable 'GP_LEFT' [Number=0-'NEW_PADW'/2])
        (Variable 'GP_RIGHT' [Number='NEW_PADW'/2])
        (Variable 'GP_TOP' [Number='NEW_PADH'/2])
        (Variable 'GP_BOTTOM' [Number=0-'NEW_PADH'/2])
        (Variable 'GP_HOVER' [Number=25])
        (Variable 'GP_VOVER' [Number=25])
    )
    #Documentation and dimensions
    ## Documentation Groups.
    ### New Group Attribute data
    (Group "GP_Attributes.adg"
        (Variable 'GP_REVLEVEL' [String='REVLEVEL'])
        (Variable 'GP_TRO' [Number='TRO'])
    )
    ## Footprint naming routine.
    (Script "GP_FootPrintName.vbs"
        (Variable 'NAME' [String='NAME'])
        (Variable 'PARTSTYLE' [String="MTG"])
        (Variable 'PINS' [String={PinCount}])
        (Variable 'BODYW' [String='PADWT'])
        (Variable 'BODYH' [String='PADHT'])
        (Variable 'CHGT' [String='CHGT'])
        (Variable 'COLS' [String='C'])
        (Variable 'ROWS' [String='R'])
        (Variable 'PITCH' [String='RP'])
        (Variable 'PITCH2' [String='CP'])
        (Variable 'BALLTYPE' [String=""])
        (Variable 'CLASS' [String=""])
        (Variable 'SUFFIX' [String='SUFFIX'])
        (Variable 'TOE2TOE' [String=0])
        (Variable 'MF' [Number='MF'])
        (Variable 'JACKPOST' [Number='JACKPOST'])
        (Variable 'MOUNTHOLE' [Number='MOUNTHOLE'])
        (Variable 'RIBBON' [Number='RIBBON'])
        (Variable 'SHIELDED' [Number='SHIELDED'])
        (Variable 'SMT' [Number='SMT'])
        (Variable 'STOP' [Number='STOP'])
        (Variable 'POLARIZED' [Number=0])
        (Variable 'PRESSFIT' [Number='PRESSFIT'])
        (Variable 'RIGHTANGLE' [Number='RIGHTANGLE'])
        (Variable 'SHROUDED' [Number='SHROUDED'])
        (Variable 'STAGGERED' [Number='STAGGERED'])
        (Variable 'KEYED' [Number='KEYED'])
        (Variable 'UPRIGHT' [Number='UPRIGHT'])
        (Variable 'LATCHED' [Number='LATCHED'])
        (ReturnValue 'NNAME' 'NNAME')
    )
    ## Origin, Rotation, Glue Dot, Name attribute
    (Origin [Number=0] [Number=0])
    (GlueDot 0 0)
    (PickPoint 0 0)
    (DefaultName [String='NNAME'])
    (Rotation [Number=0])
)



