(Origin [Number=0-'BODY_W_HALF'] [Number=0-'BODY_H_HALF'])
        (EndPoint [Number='BODY_W_HALF'] [Number=0-'BODY_H_HALF'])
        (Width [Number='SW'])
    )
    (Line
        (Layer PRO_E)
        (Origin [Number='BODY_W_HALF'] [Number=0-'BODY_H_HALF'])
        (EndPoint [Number='BODY_W_HALF'] [Number='BODY_H_HALF'])
        (Width [Number='SW'])
    )
    (Line
        (Layer PRO_E)
        (Origin [Number='BODY_W_HALF'] [Number='BODY_H_HALF'])
        (EndPoint [Number=0-'BODY_W_HALF'] [Number='BODY_H_HALF'])
        (Width [Number='SW'])
    )
    (Attribute
        (Layer PRO_E)
        (Origin 0 0)
        (Rotation 0)
        (TextStyle "H50S3")
        (Justify Center)
        (Visible False)
        (Name "Height")
        (Data [String='CHGT'])
    )
    (Attribute
        (Layer PRO_E)
        (Origin 0 0)
        (Rotation 0)
        (TextStyle "H50S3")
        (Justify Center)
        (Visible False)
        (Name "MINHEIGHT")
        (Data [String='CMHGT'])
    )
    #Documentation and dimensions
    ## padstack names
    (Text
        (Layer DIMENSION)
        (Origin 0 [Number='BOTTOM'-300])
        (Rotation 0)
        (Justify UpperCenter)
        (Visible True)
        (Data [String="Default Padstyle: "+'DefPad'])
    )
    (Text
        (Layer DIMENSION)
        (Origin 0 [Number='BOTTOM'-360])
        (Rotation 0)
        (Justify UpperCenter)
        (Visible True)
        (Data [String="Pin 1 Padstyle: "+'DefPad1'])
        (DoIf [String='DefPad']<>[String='DefPad1'])
    )
    (Text
        (Layer DIMENSION)
        (Origin 0 [Number='BOTTOM'-420])
        (Rotation 0)
        (Justify UpperCenter)
        (Visible True)
        (Data [String="Alt 1 Padstyle: "+'A1_Pad'])
    )
    (Text
        (Layer DIMENSION)
        (Origin 0 [Number='BOTTOM'-480])
        (Rotation 0)
        (Justify UpperCenter)
        (Visible True)
        (Data [String="Alt 2 Padstyle: "+'A2_Pad'])
    )
    ## Dimensions
    (Dimension
        (Layer DIMENSION)
        (Orientation Horizontal)
        (Point1 [Number=0-('CP'/2)] [Number=0])
        (Point2 [Number='CP'/2] [Number=0])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number='BOTTOM'-100])
        (Text [String="<PRETTYDIM="+'CP'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify UpperCenter)
    )
    (Dimension
        (Layer DIMENSION)
        (Orientation Horizontal)
        (Point1 [Number=0-('BODY_W'/2)] [Number='BOTTOM'-'BOV'])
        (Point2 [Number='BODY_W'/2] [Number='BOTTOM'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number='BOTTOM'-200])
        (Text [String="<PRETTYDIM="+'BODY_W'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify UpperCenter)
    )
    (Dimension
        (Layer DIMENSION)
        (Orientation Horizontal)
        (Point1 [Number=0-('DW1'/2)] [Number='BODY_H'-'BOV'])
        (Point2 [Number='DW1'/2] [Number='BODY_H'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number=('TOP'-'BOV')+100])
        (Text [String="<PRETTYDIM="+'DW1'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify LowerCenter)
    )
    (Dimension
        (Layer DIMENSION)
        (Orientation Vertical)
        (Point1 [Number=0-('CP'/2)] 0)
        (Point2 [Number='LEFT'] [Number=0-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('LEFT')-100] [Number=0-('BOV'/2)])
        (Text [String="<PRETTYDIM="+'BOV'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify Right)
    )
    (Dimension
        (Layer DIMENSION)
        (Orientation Vertical)
        (Point1 [Number='LEFT'] [Number='BODY_H'-'BOV'])
        (Point2 [Number='LEFT'] [Number='BOTTOM'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('LEFT')-200] [Number=('BODY_H'/2)-'BOV'])
        (Text [String="<PRETTYDIM="+'BODY_H'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify Right)
    )
    (Dimension
        (Layer DIMENSION)
        (Orientation Vertical)
        (Point1 [Number='RIGHT'] [Number='BOTTOM'-'BOV'])
        (Point2 [Number='RIGHT'] [Number=('DH'-'BOV')])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('RIGHT')+100] [Number=('DH'/2)-'BOV'])
        (Text [String="<PRETTYDIM="+'DH'+">"])
        (TextRotation 0)
        (TextStyle "H25s3")
        (TextJustify Left)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Horizontal)
        (Point1 [Number=0-('CP'/2)] [Number=0])
        (Point2 [Number='CP'/2] [Number=0])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number='BOTTOM'-100])
        (Text "CP")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify UpperCenter)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Horizontal)
        (Point1 [Number=0-('BODY_W'/2)] [Number='BOTTOM'-'BOV'])
        (Point2 [Number='BODY_W'/2] [Number='BOTTOM'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number='BOTTOM'-200])
        (Text "BODY_W")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify UpperCenter)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Horizontal)
        (Point1 [Number=0-('DW1'/2)] [Number='BODY_H'-'BOV'])
        (Point2 [Number='DW1'/2] [Number='BODY_H'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=0] [Number=('TOP'-'BOV')+100])
        (Text "DW1")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify LowerCenter)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Vertical)
        (Point1 [Number=0-('CP'/2)] 0)
        (Point2 [Number='LEFT'] [Number=0-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('LEFT')-100] [Number=0-('BOV'/2)])
        (Text "BOV")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify Right)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Vertical)
        (Point1 [Number='LEFT'] [Number='BODY_H'-'BOV'])
        (Point2 [Number='LEFT'] [Number='BOTTOM'-'BOV'])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('LEFT')-200] [Number=('BODY_H'/2)-'BOV'])
        (Text "BODY_H")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify Right)
    )
    (Dimension
        (Layer INPUTDIMENSIONS)
        (Orientation Vertical)
        (Point1 [Number='RIGHT'] [Number='BOTTOM'-'BOV'])
        (Point2 [Number='RIGHT'] [Number=('DH'-'BOV')])
        (LineWidth [Number='DW'])
        (Visible True)
        (TextLocation [Number=('RIGHT')+100] [Number=('DH'/2)-'BOV'])
        (Text "DH")
        (TextRotation 0)
        (TextStyle "H80s4")
        (TextJustify Left)
    )
    ## Documentation Groups.
    (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="LED2"])
        (Variable 'PINS' [String={PinCount}])
        (Variable 'BODYW' [String='BODY_W'])
        (Variable 'BODYH' [String='BODY_H'])
        (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="RIGHT"])
        (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
    (GlueDot 0 0)
    (PickPoint 0 0)
    (Origin [Number=('CP'/2)] [Number=0]0)
    (DefaultName [String='NNAME'])
    (Rotation [Number='PROT'])
    # Silkscreen and Assembly Data
    ## Pin One Marker
    ### New Diode pin 1 marker data
    (Group "GP_Diode.adg"
        (Variable 'GP_ORX' [Number=0-(('BODY_W'/2)+30)])
        (Variable 'GP_ORY' [Number=0])
        (Variable 'GP_PROT' [Number=180])
        (DoIf [String='PMK']=[String="Diode"])
    )
    ### triangle
    (Line
        (Layer TOP_SILKSCREEN)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=-10])
        (Width [Number='SW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_SILKSCREEN)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=-10])
        (Width [Number='SW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_SILKSCREEN)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=0])
        (Width [Number='SW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_SILKSCREEN)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=-10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=0])
        (Width [Number='SW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
     (Line
        (Layer TOP_ASSEMBLY)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=-10])
        (Width [Number='AW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_ASSEMBLY)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=-10])
        (Width [Number='AW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_ASSEMBLY)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=+10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=0])
        (Width [Number='AW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Line
        (Layer TOP_ASSEMBLY)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+10] [Number=-10])
        (EndPoint [Number='RIGHT'+'COURTYARD_EXCESS'+30] [Number=0])
        (Width [Number='AW'])
        (DoIf [String='PMK']=[String="Triangle"])
    )
    (Arc
        (Layer TOP_SILKSCREEN)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'+20] [Number=0])
        (Radius [Number=20])
        (StartAngle 0)
        (SweepAngle 360)
        (Width [Number='SW'])
        (DoIf [String='PMK']=[String="Dot"])
    )
    (Arc
        (Layer TOP_ASSEMBLY)
        (Origin [Number='RIGHT'+'COURTYARD_EXCESS'-20] [Number=0])
        (Radius [Number=7])
        (StartAngle 0)
        (SweepAngle 360)
        (Width [Number='AW'])
        (DoIf [String='PMK']=[String="Dot"])
    )
    ## Body Lines and Groups
    ### Dome Lines/Arcs
    (Arc
        (Layer TOP_SILKSCREEN)
        (Origin [Number=0] [Number=(('BODY_H'+'DH_DW1')-'BOV')])
        (Radius [Number='DW1'/2+('SW'/2+2)])
        (StartAngle 0)
        (SweepAngle 180)
        (Width [Number='SW'])
    )
    (Arc
        (Layer TOP_ASSEMBLY)
        (Origin [Number=0] [Number=(('BODY_H'+'DH_DW1')-'BOV')])
        (Radius [Number='DW1'/2])
        (StartAngle 0)
        (SweepAngle 180)
        (Width [Number='AW'])
    )
    (Line
        (Layer Top_SILKSCREEN)
        (Origin [Number=0-('DW1'/2)-('SW'/2+2)] [Number='BODY_H'-'BOV'+('SW'/2+2)])
        (EndPoint [Number=0-('DW1'/2)-('SW'/2+2)] [Number=('BODY_H'+'DH_DW1')-'BOV'+('SW'/2+2)])
        (Width [Number='SW'])
    )
    (Line
        (Layer Top_SILKSCREEN)
        (Origin [Number=('DW1'/2)+('SW'/2+2)] [Number='BODY_H'-'BOV'+('SW'/2+2)])
        (EndPoint [Number=('DW1'/2)+('SW'/2+2)] [Number=('BODY_H'+'DH_DW1')-'BOV'+('SW'/2+2)])
        (Width [Number='SW'])
    )
    (Line
        (Layer Top_ASSEMBLY)
        (Origin [Number=0-('DW1'/2)] [Number='BODY_H'-'BOV'])
        (EndPoint [Number=0-('DW1'/2)] [Number=('BODY_H'+'DH_DW1')-'BOV'])
        (Width [Number='AW'])
    )
    (Line
        (Layer Top_ASSEMBLY)
        (Origin [Number=('DW1'/2)] [Number='BODY_H'-'BOV'])
        (EndPoint [Number=('DW1'/2)] [Number=('BODY_H'+'DH_DW1')-'BOV'])
        (Width [Number='AW'])
    )
    (Group "GP_FourCornersGraphics.adg"
        (Variable 'GP_AW' [Number='AW'])
        (Variable 'GP_SW' [Number='SW'])
        (Variable 'GP_LLH' [Number=0-'BODY_W_HALF'])
        (Variable 'GP_LLV' [Number=0-'BOV'])
        (Variable 'GP_LRH' [Number='BODY_W_HALF'])
        (Variable 'GP_LRV' [Number=0-'BOV'])
        (Variable 'GP_URH' [Number='BODY_W_HALF'])
        (Variable 'GP_URV' [Number=('BODY_H'-'BOV')])
        (Variable 'GP_ULH' [Number=0-'BODY_W_HALF'])
        (Variable 'GP_ULV' [Number=('BODY_H'-'BOV')])
        (Variable 'GP_CHGT' [Number='CHGT'])
        (Variable 'GP_CMHGT' [Number='CMHGT'])
    )
)



