public static PLRelation makePlRelation(LogicObject relation, String modulename) {
    modulename = modulename;
    { PLRelation xmlrelation = PLRelation.new_PLRelation();

      xmlrelation.Module = relation.homeModule().moduleFullName;
      if (Logic.functionP(relation)) {
        xmlrelation.IsFunction = "TRUE";
      }
      else {
        xmlrelation.IsFunction = "FALSE";
      }
      if (Logic.closedTermP(relation)) {
        xmlrelation.IsClosed = "TRUE";
      }
      else {
        xmlrelation.IsClosed = "FALSE";
      }
      xmlrelation.SourceString = "";
      xmlrelation.RelationName = GuiServer.xmlifyString(GuiServer.plObjectToGuiName(relation));
      return (xmlrelation);
    }
  }