def METHOD_NAME(cntlr):
    # save DTS menu item has been invoked
    if cntlr.modelManager is None or cntlr.modelManager.modelXbrl is None:
        cntlr.addToLog("No taxonomy loaded.")
        return
        # get file name into which to save log file while in foreground thread
    componentFile = cntlr.uiFileDialog("save",
            title=_("arelle - Save Component file"),
            initialdir=cntlr.config.setdefault("chComponentFileDir","."),
            filetypes=[(_("Component file .xml"), "*.xml")],
            defaultextension=".xml")
    if not componentFile:
        return False
    import os
    cntlr.config["chComponentFileDir"] = os.path.dirname(componentFile)
    cntlr.saveConfig()
    try:
        generateCHComponent(cntlr.modelManager.modelXbrl, componentFile)
    except Exception as ex:
        dts = cntlr.modelManager.modelXbrl
        dts.error("exception",
            _("Component file generation exception: %(error)s"), error=ex,
            modelXbrl=dts,
            exc_info=True)