-
Notifications
You must be signed in to change notification settings - Fork 0
Downloading models
Downloading models from a BIMserver is a two-step process.
The method you call is "ServiceInterface.download". This method returns a TopicId (Long). This TopicId can be passed to ServiceInterface.getDownloadData to get the actual data (see step 2). This process has been split over 2 methods because the process potentially takes a long time and could produce errors along the way. The TopicId can also be used to get information about the progress.
The download method method has 4 parameters.
- roids (A set/list of roid). A roid can be acquired by called .oid on a Revision, .lastRevisionId on a Project
- query (A valid JSON query) When you are using the BIMserver API over JSON, you need to base64 this
- serializerOid. Tell BIMserver how to serialize the results of the query. See (Acquire serializer)
- sync. Whether this method should return right away (async) or wait for the process to finsh (sync)
The typical order of methods you would call are
project = ServiceInterface.getProjectsByName("project name")[0];
serializer = ServiceInterface.getSerializerByContentType("application/ifc");
roid = project.getLastRevisionId;
long topicId = ServiceInterface.download([roid], query, serializer.oid, false);
More information about (Projects)[]
This is the most consistent way, because all other communications with BIMserver happens in the same way.
ServiceInterface.getDownloadData(topicId);
There are two reasons why this alternative method exists:
- To allow the models to be downloaded by browsers, in a way that the downloaded file does not have to be "extracted" from another file (for example JSON).
- For efficiency reasons (for example JSON would have to encode binary data in base64)
The way to use this method is to send a HTTP GET to [yourbimserver]/download. The required parameters:
| Name | Description | Required |
|---|---|---|
| token | Your BIMserver auth token | Yes |
| topicId | The TopicId returned by either the download method | Yes |
| zip | Whether to download the content in a ZIP file. Even if this argument is not "on" or not supplied, the content might still be compressed, this depends on the HTTP headers sent/received | No |
Get Started
- Quick Guide
- Requirements Version 1.2
- Requirements Version 1.3
- Requirements Version 1.4
- Requirements Version 1.4 > 2015-09-12
- Requirements Version 1.5
- Download
- JAR Starter
- Setup
Deployment
- Ubuntu installation
- Windows installation
- Security
- Memory Usage
- More memory
- Performance statistics
- Large databases
Developers
- Service Interfaces
- Common functions
- Data Model
- Low Level Calls
- Endpoints
Clients
BIMServer Developers
- Plugins in 1.5
- Plugin Development
- Eclipse
- Eclipse Modeling Framework
- Embedding
- Terminology
- Database/Versioning
- IFC STEP Encoding
- Communication
- Global changes in 1.5
- Writing a service
- Services/Notifications
- BIMserver 1.5 Developers
- Extended data
- Extended data schema
- Object IDM
New developments
- New remote service interface
- Plugins new
- Deprecated
- New query language
- Visual query language
- Reorganizing BIMserver JavaScript API
General