Tangl Value Analysis Result Export via OData
Tangl Value Analysis Result Export via OData
The instruction for obtaining the data of the BOQ (bill of quantities) from the Tangle value service is intended to describe the logic of user interface interaction with the Tangl platform. The purpose of creating a user interface is to obtain data from the BOQ (bill of quantities) based on data from the Tangle value service selected by the user for a specific project, model and data version.
The algorithm for obtaining data for a BOQ request via OData UnionTree Controller:
- Getting a list of companies available to the user.
- Getting a list of projects and models for the company.
- Getting a list of models with versions for the selected model.
- Getting analyses for the project, model, and model version.
- Getting the BOQ for the company, project, model, scheme and version of the analysis.
Description of the algorithm's operations
1. List of companies available to the user
GET https://auth.tangl.cloud/api/app/company
- Request data - none.
- Example of a successful response:
[
{
"id": "6aff1999-2a57-0f5c-cd45-39f9a06810e0",
"name": "Bim-Cluster"
},
{
"id": "5015c0af-1853-001b-564b-39f9a058e224",
"name": "Tangl"
}
]
2. Getting a list of projects by company
Getting a list of projects and models for the selected company.
GET https://value.tangl.cloud/api/app/project/{companyId}/byCompanyId
- Request Data:
- CompanyId - unique company ID
- Example of a successful response:
[
{
"catalogPrioritiesSchemes": [],
"catalogPrioritiesSchemeIds": [
"b6763782-f615-4e88-8e0f-1af92399811f"
],
"selectedExcelExportTemplateId": "00000000-0000-0000-0000-000000000000",
"projectSettings": {
"excelValueExport": {
}
},
"name": "TestProject",
"companyId": "96a15f05-6e48-a875-72ec-3a06a0563592",
"currency": null,
"startDate": null,
"endDate": null,
"users": null,
"folders": [
{
"models": [
{
"id": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "Проект1_Тест"
}
],
"folders": [],
"unionModels": [
{
"id": "08d89f7b-07cf-4320-95cf-60f461e17bb3",
"models": [
{
"id": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"name": "Проект1_Тест",
"isChecked": true,
"isDeleted": false
},
{
"id": "4c6c6471-8e73-9d7a-5eea-3a0b8e69d5da",
"name": "XmlTest",
"isChecked": true,
"isDeleted": false
}
],
"fromStart": false,
"fromEnd": true,
"versionNumber": 1,
"name": "Сводная модель"
}
],
"name": "Model"
},
{
"models": [
{
"id": "4c6c6471-8e73-9d7a-5eea-3a0b8e69d5da",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "XmlTest"
}
],
"folders": [],
"unionModels": [],
"name": "XML"
}
],
"models": [],
"overridenTwigs": [],
"unionModels": [],
"extraProperties": {},
"concurrencyStamp": "6f48c54952f94cf8aa8740d5a8090b1c",
"id": "14626a83-5a0c-64d3-109d-3a06a05a1571"
},
{
"catalogPrioritiesSchemes": [],
"catalogPrioritiesSchemeIds": [
"6854bff7-c8df-45dd-9054-4ccf58b0e323"
],
"selectedExcelExportTemplateId": "00000000-0000-0000-0000-000000000000",
"projectSettings": {
"excelValueExport": {
}
},
"name": "TestProject_Formulas",
"companyId": "96a15f05-6e48-a875-72ec-3a06a0563592",
"currency": null,
"startDate": null,
"endDate": null,
"users": null,
"folders": [
{
"models": [
{
"id": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "Проект1_Тест"
}
],
"folders": [],
"unionModels": [],
"name": "Проект"
}
],
"models": [],
"overridenTwigs": [],
"unionModels": [],
"extraProperties": {},
"concurrencyStamp": "c84e219a3bce4f70ae5b7399828cdd78",
"id": "bfa834b9-7215-c439-7b3f-3a0cf1cb1638"
}
]
3.Getting a list of model versions
Scenarios for the selected models from point 2:
- Object from the models array - getting a list of versions according to point 3.
- Object from the unionModels array - go to point 4.
GET https://platform.tangl.cloud/api/app/metaModels/{metaModelId}
- Request data:
- metaModelId - unique model ID
- Example of a successful response:
{
"name": "Проект1_Тест",
"externalModelId": "00000000-0000-0000-0000-000000000000",
"companyId": "96a15f05-6e48-a875-72ec-3a06a0563592",
"sw": "RVT",
"checkedForAnalysis": false,
"versions": [
{
"externalVersionId": "00000000-0000-0000-0000-000000000000",
"id": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"geomData": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"glb": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"meta": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"modelPath": "C:\\Users\\dpave\\Desktop\\Проект1_Тест.rvt",
"desc": "Данные элементов модели",
"date": "2022-12-29T14:07:10.844Z",
"totalElementsCount": 47,
"elementsCount": 47,
"lastModifiedEmail": "dpavel@bimcl.ru",
"versionIndex": 1
}
],
"checkExpiration": false,
"isDeleted": false,
"deletionTime": null,
"extraProperties": {
"ModelPath": "C:\\Users\\dpave\\Desktop\\Проект1_Тест.rvt",
"Desc": "Данные элементов модели",
"Date": "2022-12-29T14:07:10.844Z",
"TotalElementsCount": 47,
"ElementsCount": 47,
"LastModifiedEmail": "dpavel@bimcl.ru"
},
"concurrencyStamp": "e8e1228319e94ac48f73c882eea6bb39",
"id": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
}
4. Getting project, model, and model version analyses
For the selected data in the previous paragraphs - project and model in point 2, model versions in point 3, we get a list of analyses.
GET https://value.tangl.cloud/api/app/analysis/collectionByModelVersion?projectId={projectId}&modelId={metaModelId}&modelVersionId={metaModelVersionId}
- Request Data:
- ProjectID - unique project ID
- metaModelId - unique model
- ID metaModelVersionId - unique model ID, for an object from the unionModels array in the request to send the default value for Guid (00000000-0000-0000-0000-000000000000)
- Example of a successful response:
[
{
"isApproved": false,
"totalCost": 35,
"positionUnits": [
{
"type": null,
"unit": "m3",
"roundingDegree": 3
}
],
"catalogPrioritiesSchemes": [
{
"id": "6989e5da-3194-44c1-8f2d-45994bb41cf8",
"name": "Scheme",
"catalogPriorities": [
{
"priority": 1,
"disableLinks": false,
"id": "f066211c-8103-1f02-492d-3a0767da412c",
"name": "ImportCatalog",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFFF1493"
}
],
"concurrencyStamp": null
}
],
"localVars": [
"Width"
],
"trees": {
"elementsResultsTree": null,
"catalogsResultsTree": null,
"unionResultsTrees": null
},
"id": "58fb42f8-700f-fdb4-17e7-3a0efd6be269",
"name": null,
"projId": "14626a83-5a0c-64d3-109d-3a06a05a1571",
"modelId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelVersionId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelVersionIndex": 1,
"meta": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"glb": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"geomData": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"desc": "Scheme",
"status": 1,
"version": 26,
"date": "2023-11-20T05:40:59.053Z",
"dateModel": "2022-12-29T14:07:10.844Z",
"progress": 100,
"error": "",
"isTest": false,
"evalJobId": "655af16b7b2ddc91779a535a",
"isCreateUnionAnalyses": false,
"nextAnalyses": null,
"lastModifiedEmail": "dpavel@bimcl.ru",
"childAnalyzes": null,
"exportXlsxId": "00000000-0000-0000-0000-000000000000",
"mappingParameters": null,
"concurrencyStamp": "251cc3ffc4c44d46a4d4ad843f6096bf"
},
{
"isApproved": false,
"totalCost": 5243.919,
"positionUnits": [
{
"type": null,
"unit": "m3",
"roundingDegree": 3
}
],
"catalogPrioritiesSchemes": [
{
"id": "f8d2ff41-0283-4cc4-8410-a4dde8a94fc2",
"name": "888",
"catalogPriorities": [
{
"priority": 1,
"disableLinks": false,
"id": "1fc57d90-1256-f835-0246-3a079cf6e508",
"name": "FER-11",
"isUse": true,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FF0000CD"
}
],
"concurrencyStamp": null
}
],
"localVars": [],
"trees": {
"elementsResultsTree": null,
"catalogsResultsTree": null,
"unionResultsTrees": null
},
"id": "eba8dea6-fac7-b44f-34f1-3a0eef34c0eb",
"name": null,
"projId": "14626a83-5a0c-64d3-109d-3a06a05a1571",
"modelId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelVersionId": "a09d8deb-2e7a-fd29-1959-3a06ecbc0533",
"metaModelVersionIndex": 1,
"meta": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"glb": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"geomData": [
"a09d8deb-2e7a-fd29-1959-3a06ecbc0533"
],
"desc": "888",
"status": 1,
"version": 25,
"date": "2023-11-17T11:26:04.786Z",
"dateModel": "2022-12-29T14:07:10.844Z",
"progress": 100,
"error": "",
"isTest": false,
"evalJobId": "65574ddac52b738816525890",
"isCreateUnionAnalyses": false,
"nextAnalyses": null,
"lastModifiedEmail": "dpavel@bimcl.ru",
"childAnalyzes": null,
"exportXlsxId": "00000000-0000-0000-0000-000000000000",
"mappingParameters": null,
"concurrencyStamp": "90a08cef77fc402eabcd6cc6296dab8a"
}
]
5. Getting BOQ by company, project, model, schema, and analysis version
For the selected data in the previous paragraphs - company in point 1, project and model in point 2 and 3, schema in point 4 (corresponds to the selected object from the catalogPrioritiesSchemes array).
GET https://value.tangl.cloud/api/odata/UnionTree('{company}','{project}','{model}','{scheme}')?version={modelVersion.analysisVersion}&parents={getParents}
- Request Data:
- company - company name
- project - project name
- model - model name
- scheme - priority scheme name
- modelVersion - model version number
- analysisVersion - analysis version number
- getParents - boolean property responsible for getting the parents of end positions
- Example of a successful response:
{
"@odata.context": "http://value.tangl.cloud/api/odata/$metadata#UnionTree",
"value": [
{
"CatalogName": "Xml_Комплексы",
"Code": "1.1",
"Name": "Тангл1",
"Unit": "",
"Value": 0.0,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "2de13350-de83-27ff-57bf-3a0b8e6b339d",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": []
},
{
"CatalogName": "Xml_Секции",
"Code": "1.1",
"Name": "Секция 1",
"Unit": "",
"Value": 0.0,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "0d108219-bf19-e6e7-e45e-3a0b8e6a3ce9",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "2de13350-de83-27ff-57bf-3a0b8e6b339d",
"LocalVars": []
},
{
"CatalogName": "Xml_Конструкции",
"Code": "1.1",
"Name": "Стены",
"Unit": "",
"Value": 0.0,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "2277dea0-7427-be1f-ec1d-3a0b8e5bb6ac",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "0d108219-bf19-e6e7-e45e-3a0b8e6a3ce9",
"LocalVars": []
},
{
"CatalogName": "Xml_Уровни",
"Code": "12",
"Name": "Уровень 2",
"Unit": "",
"Value": 0.0,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "09bc5bd9-1587-71c2-1e19-3a0b8e5d009e",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "2277dea0-7427-be1f-ec1d-3a0b8e5bb6ac",
"LocalVars": [
{
"Name": "Level",
"Value": "Уровень 2"
}
]
},
{
"CatalogName": "Xml_Работы",
"Code": "1.1",
"Name": "Бетонирование конструкции",
"Unit": "m3",
"Value": 1.17,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "ee917090-a755-4bb9-e59a-3a0b8e56eb3a",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "09bc5bd9-1587-71c2-1e19-3a0b8e5d009e",
"LocalVars": []
},
{
"CatalogName": "Xml_Материалы",
"Code": "1.1",
"Name": "Бетон B25",
"Unit": "m3",
"Value": 1.17,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "79533105-7d99-3d88-55b9-3a0b8e57b4d4",
"Company": "Павел_Тест_Т",
"Project": "TestProject",
"Model": "XmlTest",
"Tree": "XMLScheme",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 4,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "ee917090-a755-4bb9-e59a-3a0b8e56eb3a",
"LocalVars": []
}
]
}