简体   繁体   English

查看器使用IFC文件中的attributeNames搜索

[英]Viewer search with attributeNames from an IFC file

Searching with viewer.search() and using attributeNames when using an file converted from an IFC file, the attributeNames are too general. 当使用从IFC文件转换的文件时,使用viewer.search()搜索并使用attributeNames时,attributeNames太笼统。 Instead of attributeName being for example IfcDescription almost all IFC attributeNames are LcIFCProperty:IFCString. 代替例如ifcDescription的attributeName,几乎所有IFC attributeNames都是LcIFCProperty:IFCString。

Can I use displayCategory, displayName or displayValue to narrow down the search? 我可以使用displayCategory,displayName或displayValue来缩小搜索范围吗? Or is there any plans to make more specific attributeNames in the future? 还是将来有计划制作更具体的attributeNames?

attributeName:"LcIFCProperty:IFCString"
displayCategory:"IFC"
displayName:"DESCRIPTION"
displayValue:"Supply air device"

These are two different properties, both have LcIFCProperty:IFCString as the attributeName. 这是两个不同的属性,都具有LcIFCProperty:IFCString作为attributeName。

attributeName:"LcIFCProperty:IFCString"
displayCategory:"MagiCAD Pset_AirTerminal"
displayName:"PartType"
displayValue:"Supply air device"

That's correct, the viewer.search() method will restrict the search to attribute specified on the attributeNames array . 没错,viewer.search()方法将搜索限制在attributeNames数组上指定的属性上 If you want to search everywhere, just use null instead. 如果要在任何地方搜索,只需使用null即可。

As per 2.11 version change log : viewer.getProperties() will now return both attributeName and displayName (if available). 按照2.11版本更改日志viewer.getProperties()现在将同时返回attributeName和displayName(如果可用)。 The attributeName can be use as a filter for viewer.search() calls. attributeName可以用作viewer.search()调用的过滤器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM