public AxoObjectInstanceAbstract(
      AxoObjectAbstract type, Patch patch1, String InstanceName1, Point location) {
    super();
    this.type = type;
    typeName = type.id;
    if (type.createdFromRelativePath && (patch1 != null)) {
      String pPath = patch1.getFileNamePath();
      String oPath = type.sPath;

      if (oPath.endsWith(".axp") || oPath.endsWith(".axo") || oPath.endsWith(".axs")) {
        oPath = oPath.substring(0, oPath.length() - 4);
      }
      pPath = pPath.replaceAll("\\\\", "/");
      oPath = oPath.replaceAll("\\\\", "/");
      String[] pPathA = pPath.split("/");
      String[] oPathA = oPath.split("/");
      int i = 0;
      while ((i < pPathA.length) && (i < oPathA.length) && (oPathA[i].equals(pPathA[i]))) {
        i++;
      }
      String rPath = "";
      for (int j = i; j < pPathA.length - 1; j++) {
        rPath += "../";
      }
      if (rPath.isEmpty()) {
        rPath = ".";
      } else {
        rPath = rPath.substring(0, rPath.length() - 1);
      }
      for (int j = i; j < oPathA.length; j++) {
        rPath += "/" + oPathA[j];
      }

      System.out.println(rPath);
      typeName = rPath;
      //            File f = new File();
      //            f.ge
      //            typeName =
    }

    typeSHA = type.getSHA();
    typeUUID = type.getUUID();
    this.InstanceName = InstanceName1;
    this.x = location.x;
    this.y = location.y;
    this.patch = patch1;
  }