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. Getting a list of companies available to the user
GET https://auth.tangl.cloud/api/app/company
- Request data - none.
- Example of a successful response:
[
{
"id": "178fda74-d35c-fec7-1d4a-3a077ce1cc24", // company ID
"name": "Developers Demo_T",
"isPersonal": false
},
]
2. Getting a list of projects and models for the 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 - copy from the successful response in step 1
- Example of a successful response:
[
{
"catalogPrioritiesSchemes": [],
"catalogPrioritiesSchemeIds": [
"c224d486-9b0b-43ef-9d89-9c533c919dd1",
"83beaa07-58d4-4ae3-abb7-437426c9edf3"
],
"selectedExcelExportTemplateId": "00000000-0000-0000-0000-000000000000",
"projectSettings": {
"excelValueExport": {
"isExportApprovedInfo": true,
"isExportApprovedNumbers": true,
"isExportPrice": true,
"isExportUnmapped": false,
"isOnlyTwoColumns": true,
"isExportParentSum": false,
"isExportElementsTree": false,
"isExportCatalogsTrees": false,
"isExportUnionTree": true,
"isExportElsTreeCats": false,
"isExportElsTreeTypes": false,
"isExportElsTreeEls": false,
"isExportElsTreePos": false,
"isExportCatsTreeParentPos": false,
"isExportCatsTreeEls": false,
"isExportUnionTreeParentPos": true,
"isExportUnionTreeEls": false,
"exportedLocalVars": [],
"useDefaultExportTemplate": true,
"addPricesOfEachLevelInSeparateColumns": false,
"sumPricesOfChildPositionsInSeparateColumns": false
}
},
"name": "АПУ_Ползунова_2 очередь",
"companyId": "178fda74-d35c-fec7-1d4a-3a077ce1cc24",
"currency": null,
"startDate": null,
"endDate": null,
"users": null,
"folders": [
{
"models": [
{
"id": "1966df21-1a8b-3b1a-97d8-3a0bd4fabc2c",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР"
}
],
"folders": [],
"unionModels": [],
"name": "АР"
},
{
"models": [
{
"id": "4b9f664e-08b5-a8db-2913-3a0bd50b372a",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_КЖ"
}
],
"folders": [],
"unionModels": [],
"name": "КЖ"
},
{
"models": [
{
"id": "2c84f5dc-f29e-3a94-1b5d-3a0bd4fd1b52", // MetaModelID
"sw": "RVT",
"checkedForAnalysis": false,
"name": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_ВК"
}
],
"folders": [],
"unionModels": [],
"name": "ВК"
}
],
"models": [],
"overridenTwigs": [],
"unionModels": [],
"extraProperties": {},
"concurrencyStamp": "dc0115755cf24b3fbf0066ba7ab6393f",
"id": "4302f7d4-c513-7516-e32a-3a0bd4f9cf4a" // unique projectID
},
{
"catalogPrioritiesSchemes": [],
"catalogPrioritiesSchemeIds": [
"48485c5c-7da3-45f7-b55d-7f0198e2066d"
],
"selectedExcelExportTemplateId": "00000000-0000-0000-0000-000000000000",
"projectSettings": {
"excelValueExport": {
"isExportApprovedInfo": true,
"isExportApprovedNumbers": true,
"isExportPrice": true,
"isExportUnmapped": true,
"isOnlyTwoColumns": true,
"isExportParentSum": true,
"isExportElementsTree": true,
"isExportCatalogsTrees": true,
"isExportUnionTree": true,
"isExportElsTreeCats": true,
"isExportElsTreeTypes": true,
"isExportElsTreeEls": true,
"isExportElsTreePos": true,
"isExportCatsTreeParentPos": true,
"isExportCatsTreeEls": true,
"isExportUnionTreeParentPos": true,
"isExportUnionTreeEls": true,
"exportedLocalVars": [],
"useDefaultExportTemplate": true,
"addPricesOfEachLevelInSeparateColumns": true,
"sumPricesOfChildPositionsInSeparateColumns": true
}
},
"name": "Тест",
"companyId": "178fda74-d35c-fec7-1d4a-3a077ce1cc24",
"currency": null,
"startDate": null,
"endDate": null,
"users": null,
"folders": [
{
"models": [
{
"id": "795dfd3e-fc77-5445-0ecf-3a09a53ec33a",
"sw": "RVT",
"checkedForAnalysis": false,
"name": "АР1"
}
],
"folders": [],
"unionModels": [],
"name": "Объект"
}
],
"models": [],
"overridenTwigs": [],
"unionModels": [],
"extraProperties": {},
"concurrencyStamp": "80a10127c6b94457b86b0fa1cf68fabd",
"id": "6c394c72-09ec-f4a7-d937-3a09a503c374"
}
]
3.Getting a list of models with versions for the selected model
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": "АПУ-087-00_Ползунова_2оч_д.4_сек.Б_Р_АР_отсоединено",
"externalModelId": "00000000-0000-0000-0000-000000000000",
"companyId": "99765487-02d0-1eef-cd55-3a0001a67419",
"sw": "RVT",
"checkedForAnalysis": false,
"versions": [
{
"externalVersionId": "00000000-0000-0000-0000-000000000000",
"id": "d7043dc4-a24e-9543-cc73-3a0e17385ad8",//modelVersionID
"geomData": [
"cb380e4f-28bd-a477-1a6c-3a0e17385adb"
],
"glb": [
"cb380e4f-28bd-a477-1a6c-3a0e17385adb"
],
"meta": [
"cb380e4f-28bd-a477-1a6c-3a0e17385adb"
],
"modelPath": "C:\\Users\\BIM-Cluster\\Downloads\\АСК _ Ползунова\\АСК _ Ползунова\\АР\\2022\\АПУ-087-00_Ползунова_2оч_д.4_сек.Б_Р_АР_отсоединено",
"desc": "Данные элементов модели",
"date": "2023-10-06T12:49:52.177Z",
"totalElementsCount": 20168,
"elementsCount": 20168,
"lastModifiedEmail": "mlogvinova@tangl.cloud",
"versionIndex": 1
}
],
"dataProjectId": "00000000-0000-0000-0000-000000000000",
"dataProjectFolderId": "00000000-0000-0000-0000-000000000000",
"isDeleted": false,
"deletionTime": null,
"extraProperties": {
"CheckExpiration": false
},
"concurrencyStamp": "d2dc3a16ec8c452a8f19b49c9e503a88",
"id": "01b99bc4-a839-5a75-9fcb-3a0e17385e85"
}
4. Getting analyses for the project, model, and model version
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
- 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": 0,
"positionUnits": [
{
"type": null,
"unit": "м.п.",
"roundingDegree": 3
}
],
"catalogPrioritiesSchemes": [
{
"id": "c224d486-9b0b-43ef-9d89-9c533c919dd1",
"name": "Этажи + Работы ВК",
"catalogPriorities": [
{
"priority": 1,
"disableLinks": false,
"id": "56f1f385-a34e-74b4-1f5d-3a09a4ff6b3f",
"name": "Классификатор материалов_АР",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFA52A2A"
},
{
"priority": 1,
"disableLinks": false,
"id": "d040e5b7-908f-ec52-067a-3a09a500fb67",
"name": "Классификатор работ_АР",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFA52A2A"
},
{
"priority": 2,
"disableLinks": false,
"id": "669b97fd-2ee3-ad2b-8c42-3a0bd50813e5",
"name": "Классификатор работ_ВК",
"isUse": true,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": null
},
{
"priority": 1,
"disableLinks": false,
"id": "b318daa0-b27c-9fbb-3470-3a0bd50b7ca0",
"name": "Классификатор работ_КЖ",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": null
},
{
"priority": 1,
"disableLinks": false,
"id": "d0803078-8b5c-32a5-6b9a-3a09a501a8bd",
"name": "Классификатор этажей",
"isUse": true,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFFF1493"
}
],
"concurrencyStamp": null
}
],
"localVars": [],
"trees": {
"elementsResultsTree": null,
"catalogsResultsTree": null,
"unionResultsTrees": null
},
"id": "8e6dce79-87d3-ada2-de7b-3a0bd524fbf0",
"name": null,
"projId": "4302f7d4-c513-7516-e32a-3a0bd4f9cf4a",
"modelId": "2c84f5dc-f29e-3a94-1b5d-3a0bd4fd1b52",
"metaModelId": "2c84f5dc-f29e-3a94-1b5d-3a0bd4fd1b52",
"metaModelVersionId": "726e196f-063c-fb34-21b6-3a0bd4fd17ce",
"metaModelVersionIndex": 1,
"modelVersionIds": null,
"meta": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"glb": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"geomData": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"desc": "Этажи + Работы ВК",
"status": 1,
"version": 3,
"date": "2023-06-16T06:50:22.014Z",
"dateModel": "2023-06-16T06:02:26.854Z",
"progress": 100,
"error": "",
"isTest": false,
"evalJobId": "648c062ef9459bee1caf7ffa",
"isCreateUnionAnalyses": false,
"nextAnalyses": null,
"lastModifiedEmail": "logvinova@bimcl.ru",
"childAnalyzes": null,
"exportXlsxId": "7f0569d1-be91-41a6-bea7-783718b52028",
"mappingParameters": null,
"useAllMetaElements": false,
"concurrencyStamp": "6b95a421f6f84eb7b67b293973013589"
},
{
"isApproved": false,
"totalCost": 0,
"positionUnits": [
{
"type": null,
"unit": "м.п.",
"roundingDegree": 3
}
],
"catalogPrioritiesSchemes": [
{
"id": "6dc48c84-0398-4766-801c-9f66d4541d6c",
"name": "Работы ВК", //priority scheme name
"catalogPriorities": [
{
"priority": 1,
"disableLinks": false,
"id": "56f1f385-a34e-74b4-1f5d-3a09a4ff6b3f",
"name": "Классификатор материалов_АР",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFA52A2A"
},
{
"priority": 1,
"disableLinks": false,
"id": "d040e5b7-908f-ec52-067a-3a09a500fb67",
"name": "Классификатор работ_АР",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFA52A2A"
},
{
"priority": 1,
"disableLinks": false,
"id": "669b97fd-2ee3-ad2b-8c42-3a0bd50813e5",
"name": "Классификатор работ_ВК",
"isUse": true,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": null
},
{
"priority": 1,
"disableLinks": false,
"id": "d0803078-8b5c-32a5-6b9a-3a09a501a8bd",
"name": "Классификатор этажей",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": "#FFFF1493"
},
{
"priority": 1,
"disableLinks": false,
"id": "b318daa0-b27c-9fbb-3470-3a0bd50b7ca0",
"name": "Классификатор работ_КЖ",
"isUse": false,
"filterTwigIds": [],
"type": 0,
"isSelfPrice": false,
"colorString": null
}
],
"concurrencyStamp": null
}
],
"localVars": [],
"trees": {
"elementsResultsTree": null,
"catalogsResultsTree": null,
"unionResultsTrees": null
},
"id": "903b435c-ce80-fd36-7363-3a0bd5226992",
"name": null,
"projId": "4302f7d4-c513-7516-e32a-3a0bd4f9cf4a",
"modelId": "2c84f5dc-f29e-3a94-1b5d-3a0bd4fd1b52",
"metaModelId": "2c84f5dc-f29e-3a94-1b5d-3a0bd4fd1b52",
"metaModelVersionId": "726e196f-063c-fb34-21b6-3a0bd4fd17ce",
"metaModelVersionIndex": 1,
"modelVersionIds": null,
"meta": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"glb": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"geomData": [
"51734976-c20a-eb69-e4f8-3a0bd4fd17ce"
],
"desc": "Работы ВК",
"status": 1,
"version": 2,
"date": "2023-06-16T06:47:33.459Z",
"dateModel": "2023-06-16T06:02:26.854Z",
"progress": 100,
"error": "",
"isTest": false,
"evalJobId": "648c0585f9459bee1caf7ff3",
"isCreateUnionAnalyses": false,
"nextAnalyses": null,
"lastModifiedEmail": "logvinova@bimcl.ru",
"childAnalyzes": null,
"exportXlsxId": "00000000-0000-0000-0000-000000000000",
"mappingParameters": null,
"useAllMetaElements": false,
"concurrencyStamp": "313ea18e524143819b807711e41aa4e4"
}
]
5. Getting the BOQ for the company, project, model, scheme and version of the analysis
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
If the priority scheme name has been changed, then uploading will take place with the initial scheme name.
- modelVersion - model version number
- analysisVersion - analysis version number
- getParents - boolean property responsible for getting the parents of end positions
Example of a request with completed data:
https://value.tangl.cloud/api/odata/UnionTree('Developers Demo_T','АПУ_Ползунова_2 очередь','АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР','Работы')?version=1.1&parents=false
- Example of a successful response:
{
"@odata.context": "http://value.tangl.cloud/api/odata/$metadata#UnionTree",
"value": [
{
"CatalogName": "Классификатор работ_АР",
"Code": "1.1",
"Name": "Облицовка стен из кирпича силикатного, 120 мм.",
"Unit": "м2",
"Value": 48.779,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "7ffc3114-7a55-8a49-1691-3a09a50127da",
"Company": "Developers Demo_T",
"Project": "АПУ_Ползунова_2 очередь",
"Model": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР",
"Tree": "Работы",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 1,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": [
{
"Name": "layer_2",
"Value": null
},
{
"Name": "layer_3",
"Value": null
}
]
},
{
"CatalogName": "Классификатор работ_АР",
"Code": "1.5",
"Name": "Кладка стен (нар.) из кирпича керамического, 120 мм.",
"Unit": "м2",
"Value": 0.017,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "a527a4c7-e652-74e2-dee9-3a09a50127da",
"Company": "Developers Demo_T",
"Project": "АПУ_Ползунова_2 очередь",
"Model": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР",
"Tree": "Работы",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 1,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": [
{
"Name": "Volume",
"Value": "0.016720660030841827"
}
]
},
{
"CatalogName": "Классификатор работ_АР",
"Code": "1.7",
"Name": "Устройство штукатурного фасада, 5 мм.",
"Unit": "м2",
"Value": 1603.242,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "75d5134f-f38b-5d6e-9380-3a09a50127da",
"Company": "Developers Demo_T",
"Project": "АПУ_Ползунова_2 очередь",
"Model": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР",
"Tree": "Работы",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 1,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": []
},
{
"CatalogName": "Классификатор работ_АР",
"Code": "1.8",
"Name": "Устройство фасада на подсистеме",
"Unit": "м2",
"Value": 133.545,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "6b95831d-82fc-799b-eea6-3a09a50127da",
"Company": "Developers Demo_T",
"Project": "АПУ_Ползунова_2 очередь",
"Model": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР",
"Tree": "Работы",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 1,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": []
},
{
"CatalogName": "Классификатор работ_АР",
"Code": "1.10",
"Name": "Устройство цоколя из плитки бетонной, 100 мм.",
"Unit": "м2",
"Value": 1.177,
"Id": "00000000-0000-0000-0000-000000000000",
"ExternalId": "00000000-0000-0000-0000-000000000000",
"TanglId": "62e22451-6eae-3529-05b3-3a09a50127da",
"Company": "Developers Demo_T",
"Project": "АПУ_Ползунова_2 очередь",
"Model": "АПУ-087-00_Ползунова_2оч_д.4_сек.А_Р_АР",
"Tree": "Работы",
"ValueCost": 0.0,
"TotalCost": 0.0,
"FullTotalCost": 0.0,
"Version": 1,
"ParentId": "00000000-0000-0000-0000-000000000000",
"ParentExternalId": "00000000-0000-0000-0000-000000000000",
"ParentTanglId": "00000000-0000-0000-0000-000000000000",
"LocalVars": []
},
]
}