BIMserver icon indicating copy to clipboard operation
BIMserver copied to clipboard

Querying different properties from the server

Open miolfo opened this issue 9 years ago • 6 comments

Hello,

I have a question regarding how to query some of the metadata that is visible in the bimvie.ws. For example, when I select one of the objects in an ifc model, I can see properties as follows in the bimvie.ws: image

How can I query the properties such as the "Tekla Reinforcement" from the server? I found no information about it on the wiki, and I went through all of the JSON queries in the Console -application, but I couldn't find a query that can be used for getting the values in the image.

Regards, Mikko Forsman

miolfo avatar Jul 28 '17 12:07 miolfo

Hello @rubendel ,

Is there any solution to this issue?

miolfo avatar Aug 30 '17 13:08 miolfo

I would also like to know the solutiion.

xie-qianyue avatar Aug 31 '17 01:08 xie-qianyue

Yes this is an important question that I have been waiting to ask. I have managed to get basic properties using multiple callbacks for json. But to find these properties is not seem easy : Quantities and pSet

dishesh avatar Jun 01 '18 06:06 dishesh

One way you can get all property sets with getObjectByType method on the LowLevelInterface interface via json. Set packageName to either "ifc4" or whatever and then set className to "IfcPropertySet".

{
  "token": "YOUR_TOKEN_HERE",
  "request": {
    "interface": "LowLevelInterface", 
    "method": "getDataObjectsByType", 
    "parameters": {
      "roid": 99999999,
      "packageName": "ifc4",
      "className": "IfcPropertySet",
      "flat": "false"
    }
  }
}

This returns all IfcPropertySet and their attached individual properties. Then you just filter by the "Name" attribute client side, in your case "Tekla Reinforcement".

All calls for the interface are accessible with some tutorials and many are documented in the console (yourhost/apps/console) if you've chosen to install it during bimserver setup.

You can learn all about the diferent classes on http://www.buildingsmart-tech.org/ifc/IFC4/Add2/html/ once you know the ifc denomination of what your looking for you can use the LowLevelInterface to get pretty much anything depending on its type.

nelsonmunoz avatar Jun 01 '18 14:06 nelsonmunoz

If you install the BimQL plugin you can also do the following:

Select $Var1
Where $Var1.Attribute.Name = "Tekla Reinforcement"

You can find more info on BimQL on http://openbimstandards.org/standards/bimql/

nelsonmunoz avatar Jun 01 '18 14:06 nelsonmunoz

Related issue: https://github.com/opensourceBIM/BIMserver/issues/867#issuecomment-440677725

rubendel avatar Nov 21 '18 15:11 rubendel