当前位置: 首页 > ai >正文

常用ECSQL整理

和元素相关的一些属性解释

ECInstanceId

FederationGuid

Used to federate (i.e. correlate) an Element with other Repositories capturing the same Guid for the same "Entity" that an Element represents. It is ensured to be unique in an iModel (i.e. unique-index on the associated db column).

CodeValue

Used to capture a Human-friendly Identifier that captures Business-meaning and it is unique in some context defined by the Business or Application creating them

ExternalSource Identifier

Elements that were synchronized from an External Source carry their Provenance via an Aspect called "ExternalSourceAspect". Such Aspect has a string-property called "Identifier" that the application synchronizing the external data uses to capture an Id from the external repository that such app (i.e. typically a Connector) uses to compare an Element with the corresponding "external record" it came from (to detect changes) during subsequent runs. Each app (Connector) stores something different in that "Identifier" property - thus, an "External Source Identifier" is only meaningful in context of the External DataSource it is associated with.

ECSQL

ECSQL - iTwin.js

 

1 查找父元素

SELECT ECInstanceId, Parent.Id FROM bis.ElementSELECT ECInstanceID, SourceECInstanceID FROM bis.ElementOwnsChildElements// SourceECInstanceID为Parentid

2 查找元素的aspect

SELECT e.ECInstanceId, e.Parent.Id, a.Identifier
FROM bis.Element e
LEFT JOIN bis.ExternalSourceAspect a ON a.Element.Id = e.ECInstanceId

3 查找元素的ExternalSource Identifier

如果是dgn,通常是Element Id,如下是根据Element Id 来找EcInstanceId

SELECT e.*
FROM bis.Element e
JOIN bis.ExternalSourceAspect a ON a.Element.Id = e.ECInstanceId
WHERE a.Identifier = ?

4 查找PhysicalModel名称

SELECT e.CodeValue from BisCore.Element e JOIN BisCore.PhysicalModel p on e.ECInstanceId = p.ECInstanceId

5 查找一个model中的所有几何元素

SELECT ECInstanceId, Model.Id AS ModelId, Category.Id AS CategoryId
FROM BisCore.GeometricElement3d  WHERE Model.Id IN (your modelId) AND GeometryStream IS NOT NULL

6 根据范围找元素

SELECT ECInstanceId FROM BisCore.SpatialIndex WHERE minX>=-81.08 AND maxX<=-80.58 AND minY>=35.00  AND maxY<=35.44// https://www.itwinjs.org/learning/spatialqueries/

http://www.xdnf.cn/news/7332.html

相关文章:

  • ‌AT6558R-5N22北斗B1I单频导航芯片
  • 《深入理解数组名:sizeof(arr)、arr 和 arr 的区别》
  • 三种嵌入式开发常用的组网方式
  • 【C++】C++的IO流
  • 青岛地铁二号线列车运行图优化系统
  • AIGC与文本生成:人工智能写作的新纪元
  • Adminer:一个基于Web的轻量级数据库管理工具
  • Python | 需求预测模型
  • 使用 docker-volume-backup 备份 Docker 卷
  • plc基础知识整理(三菱)
  • PHP 实现连续子数组的最大和、整数中1出现的次数
  • 详解Oracle HASH CHAIN和HASH BUCKET
  • TS04:高性能四通道自动灵敏度校准电容触摸传感器
  • 【氮化镓】关态下负栅压对 p-GaN HEMTs 单粒子效应的影响
  • 智慧招生:实时数字人在院校招生中的应用
  • 上路兵线的理解-鳄鱼篇
  • 【工具推荐】--Git详解
  • LightRAG 由入门到精通
  • CSS- 4.5 css + div 布局 简易网易云音乐 官网布置实例
  • R 语言科研绘图第 49 期 --- 热力图-相关性
  • MySQL进阶篇-InnoDB引擎(超细)
  • 大模型预训练、微调、部署、推理用到的工具总结
  • Lambda 表达式底层实现机制 vs 成员函数/静态成员函数可替代性对比
  • 易境通散货拼柜系统:提高货代企业货物配载效率
  • python打卡day30@浙大疏锦行
  • 【强化学习】#6 n步自举法
  • Blaster - Multiplayer P65-PXX : 射击武器
  • 吉林省建筑工程专业技术人员职称评审实施办法
  • (C语言)内存分配函数
  • 计算机图形学编程(使用OpenGL和C++)(第2版)学习笔记 13.几何着色器(二)爆炸效果修改图元类型