def METHOD_NAME( name, TYPE ):
    SaveWindowAtts = SaveWindowAttributes()
    SaveWindowAtts.outputToCurrentDirectory = 1
    SaveWindowAtts.outputDirectory = "."
    SaveWindowAtts.fileName = name
    SaveWindowAtts.family = 0
    if TYPE==0:
        SaveWindowAtts.format = SaveWindowAtts.CURVE  # BMP, CURVE, JPEG, OBJ, PNG, POSTSCRIPT, POVRAY, PPM, RGB, STL, TIFF, ULTRA, VTK, PLY
    if TYPE==1:
        SaveWindowAtts.format = SaveWindowAtts.PLY
    SetSaveWindowAttributes(SaveWindowAtts)
    SaveWindow()