Example #1
0
  private void start() {
    try {
      client = LocalDevSetup.setupJson("http://localhost:8080");
      client.getSettingsInterface().setGenerateGeometryOnCheckin(false);

      File directory = new File("d:\\testfiles");
      for (File f : directory.listFiles()) {
        process(f, null);
      }
    } catch (ServiceException e) {
      e.printStackTrace();
    } catch (PublicInterfaceNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
Example #2
0
  public static void main(String[] args) {
    BimServerClientInterface client = LocalDevSetup.setupJson("http://localhost:8080");
    try {
      SProject project =
          client.getBimsie1ServiceInterface().addProject("testProject2", "ifc2x3tc1");

      Long tid = client.getBimsie1LowLevelInterface().startTransaction(project.getOid());
      client.getBimsie1LowLevelInterface().createObject(tid, "IfcWall", false);
      Long roid = client.getBimsie1LowLevelInterface().commitTransaction(tid, "test commit");

      SSerializerPluginConfiguration serializer =
          client.getBimsie1ServiceInterface().getSerializerByContentType("application/ifc");
      client.download(roid, serializer.getOid(), new File("test2.ifc"));
    } catch (ServerException | UserException | PublicInterfaceNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }