API

The API functions can be used to write server scripts in Ruby language and run them on the server. Server scripts can be developed by advanced users to solve and automate complex tasks. An example of such tasks are: data extraction, data validation, custom reporting:

Server.ModelsList**

return an array of all IFC models, which are uploaded by the current user

list

Syntax:

IFCClassName.list

where

Syntax: IFCClassName.where(“all”,”o”) Return an Array object:

IFCCOLUMN.where("all","o").each { |o|
puts o.globalId
}

load_ifc_classes

Loads a set of IFC classes in memory without any output. It is useful to attach objects with other relationships.

to_obj

Load one IFC object through the STEP ID:

"#1001".toObj

return an object instace

toIfcObject Load one or more IFC objects through their STEP IDs:

"#1001,#1002,#1003".toIfcObject

return a hash of objects, where keys are the object IDs and values are the object instances