MainPage   Related pages 
Protected Member Functions | List of all members
domainBim::CoreAPI Class Reference

#include <domainBim/CoreAPI.h>

Inheritance diagram for domainBim::CoreAPI:
domainBim::AutomationAPI desiteCore::ProjectAPI desiteCore::NavigatorProjectAPI

Public Slots

TOOLS
QString addDays (QString dateStr, int nrDays)
 
QString timeStamp (QString format=QString())
 
int getCalendarWeek (QDateTime dt)
 
QString format (double v, int dec=2, QString frmt="%L1", int fieldWidth=10, QChar fillChar=QChar::Nbsp)
 
QString formatDateTime (QDateTime dt, QString formatstr="iso")
 
QString createID ()
 
long calcHashcode (QString str)
 
QString compressToIfcGuid (QString id)
 
QString uncompressFromIfcGuid (QString ifcGuid)
 
bool checkRegExp (QString value, QString pattern)
 
double calcSlantedArea (QString objID, double angleMin=0.0, double angleMax=45.0)
 
QVariantMap calcGpsCoordsByStation (QString objID, double station)
 
QVariantMap calcGpsCoordsByModelCoords (double x, double y)
 
QVariantMap calcGkCoordsByModelCoords (double x, double y, double z)
 
APPLICATION
QString getApplicationDirectory ()
 
QString getApplicationFilename ()
 
QString getApplicationLanguage ()
 
QString getVersionAsString ()
 
int getVersionMAJOR ()
 
int getVersionMINOR ()
 
int getVersionBUILD ()
 
bool requireVersion (int MAJOR, int MINOR, int BUILD)
 
PROJECT
QString getUserName ()
 
QString getProjectID ()
 
int getProjectVariantNumber ()
 
QString getProjectNumber ()
 
QString getProjectName ()
 
QString getProjectShortDescription ()
 
QString getProjectLongDescription ()
 
QString getProjectDirectory ()
 
QString getLocation ()
 
DOMAINS
QString getDomainByElement (QString objID)
 
PROPERTIES
QVariant getPropertyValue (QString objID, QString propName, QString propType, bool inh=true)
 
QVariant getPropertySource (QString objID, QString propName, QString propType, bool inh=true)
 
QString getPropertyUnit (QString objID, QString propName, QString propType, bool inh=true)
 
QVariant getPropertyValueByDate (QString objID, QString propName, QString propType, bool inh=true)
 
QDateTime getPropertyLastDate (QString objID, QString propName, QString propType, bool inh=true)
 
QDateTime getPropertyFirstDate (QString objID, QString propName, QString propType, bool inh)
 
QVariantMap getPropertyDateListAsJSON (QString objID, QString propName, QString propType, bool inh=true)
 
QVariantMap getPropertyTypesByObject (QString objID, QString filterPattern="*")
 
QVariantMap getPropertyTypesByDomain (QString domainName, QString filterPattern="*")
 
QVariantMap getPropertyTypeMetaData (QString pName, QString ptype)
 
QList< QVariant > getPropertyTypeList (QString domain="all", QString filterPattern="*")
 
QList< QVariant > getPropertyTypeListByObject (QString objID, QString filterPattern="*")
 
bool isPropertyInherited (QString objID, QString propName, QString propType)
 
QString getPropertyValueRange (QString IDList, QString propName, QString propType, QString domainFilter="geometry")
 
QStringList getPropertyValueList (QString propName, QString propType, int maxValues)
 
QString getPropertyValueAsString (QString objID, QString propName, QString propType, bool inh=true)
 
QVariant evaluateFormula (QString code, QString id, QString id_otherdomain=QString())
 
QString prepareJsCode (QString code, QString id, int dec=-1, QString frmt="%L1", int fieldWidth=10, QChar fillChar=QChar())
 
LINKS BETWEEN OBJECTS
QStringList getLinkedObjects (QString objectIDList, QString resultDomains="all", QString objectLookupDomains="all")
 
QStringList getTasksByObjectList (QString IDList)
 
QStringList getObjectsByTaskList (QString IDList)
 
QStringList getDocumentsByObjectList (QString IDList)
 
QStringList getObjectsByDocumentList (QString IDList)
 
QStringList getSectionsByObjectList (QString IDList)
 
QStringList getObjectsBySectionList (QString IDList)
 
QStringList getTypesByObjectList (QString IDList)
 
QStringList getObjectsByTypeList (QString IDList)
 
QStringList getResourcesByObjectList (QString IDList)
 
QStringList getObjectsByResourcesList (QString IDList)
 
QStringList getBoQItemsByObjectList (QString IDList)
 
QStringList getObjectsByBoQItemList (QString IDList)
 
QStringList getPcItemsByObjectList (QString IDList)
 
QStringList getObjectsByPcItemList (QString IDList)
 
OBJECT HIERARCHY
QStringList getContainedElements (QString containerID, int maxDepth)
 
int countContainedElements (QString containerID, int maxDepth)
 
QString getParent (QString objID)
 
QStringList getOpenings (QString objID)
 
QStringList getParts (QString objID)
 
QString getModelAsJson (QString modelId)
 
STATUS
bool isVisible (QString objID)
 
bool isSelected (QString objID)
 
bool isLocked (QString objID)
 
bool isWired (QString objID)
 
GEOMETRY
QVariantList getPointList (QString objID)
 
QVariantMap getPointOnAlignmentAtStation (QString objID, double d)
 
double getStationOfProjectedPoint (QString objID, double x, double y, double z=0.0)
 

Public Member Functions

Constructors
 CoreAPI::CoreAPI (BimProject *bimPrj, QObject *parent=0)
 
virtual ~CoreAPI ()
 
DOMAIN PROJECTS
BimProject * getBimProject ()
 

Protected Member Functions

model::IContainerObject * getIContainerObject (const QString &id, model::eDomainType domainFilter=model::typeDomainAll)
 
model::IContainer * getIContainer (const QString &id, model::eDomainType domainFilter=model::typeDomainAll)
 
model::Element * getElement (const QString &id, model::eDomainType domainFilter=model::typeDomainAll)
 
model::IProperty * _getProperty (QString objID, QString propName, QString propType, bool inh)
 
QVariant _getPropertyValue (const QString &objID, const QString &propName, const QString &propType, bool inh, bool evaluate, bool formatAsString)
 
void collectGeoObjects (const QString &IDList, QList< model::IObject * > &list)
 
QList< QDateTime > getPropertyDateList (QString objID, QString propName, QString propType, bool inh=true)
 

Detailed Description

This class provides API functions on level 1 which provides the calculation of object properties as well as conveniance methods.

Each methods declared in section 'public slots' is accessible by the API.

Core API. Baseclass for all API classes
JavaScript Objectname: desiteAPI

Since
1.0.16, 23 apr 2012 by jh
Remarks
1.5.0, moved to domainBim
Id
CoreAPI.h 956 2017-11-27 21:56:57Z jochen.hanff

(c) ceapoint aec technologies GmbH

Constructor & Destructor Documentation

virtual domainBim::CoreAPI::~CoreAPI ( )
virtual

NOT AVAILABLE IN API

Member Function Documentation

QString domainBim::CoreAPI::addDays ( QString  dateStr,
int  nrDays 
)
slot

Add days to a given date and return the new date as ISO format (yyyy-MM-ddThh-mm-ss)

Since
1.0.16
QVariantMap domainBim::CoreAPI::calcGkCoordsByModelCoords ( double  x,
double  y,
double  z 
)
slot

Calc global Gauss-Krueger cordinates from internal model coordinates.
Since the model can be moved and the reference point can be specified by the user the GK coordinates can change.

QVariantMap domainBim::CoreAPI::calcGpsCoordsByModelCoords ( double  x,
double  y 
)
slot

Calc global GPS cordinates from internal model coordinates.
Since the model can be moved and the reference point can be specified by the user the GPS coordinates can change.

QVariantMap domainBim::CoreAPI::calcGpsCoordsByStation ( QString  objID,
double  station 
)
slot

Calculates the gps coordinates by a station situated on an alignment.

The alignment is determined by traversing up the object hiererchy untill an object of type 'typeBsAlignment' ist found. Therefore each direct and indirect child object of an alignment can be passed to the method. The gps coordinates are returned as a json object, if an error occurs during the calculation, an additional error code is written to the json object.

Parameters
objID: ID of a bs element
station: The station
Returns
Gps coordinates or error code: 0 - undefined -1 - object not found -2 - alignment not found -3 - station invalid

Example:

{
Lon: 0,
Lat: 0,
Error: -1
}
Since
1.9.0, 19 may 2016, mm
long domainBim::CoreAPI::calcHashcode ( QString  str)
inlineslot

Calculate hashcode from a given string.

Since
2.1.4, 15 nov 2017, jh
double domainBim::CoreAPI::calcSlantedArea ( QString  objID,
double  angleMin = 0.0,
double  angleMax = 45.0 
)
slot

Calculate slanted area of an object. 0 <= angleMin <= angleMax <= 180

Parameters
objID: ID of object
angleMin: Min. deviation angle in relation to vector (0,0,1), default = 0.0 [deg]
angleMax: Max. deviation angle in relation to vector (0,0,1), default = 45.0 [deg] (top area criteria)
Returns
Calculated area
Since
1.5.0, 10 dec 2014, sl
Remarks
: shifted from AutomationAPI to CoreAPI in version 1.9.0, 20 may 2016, ar
bool domainBim::CoreAPI::checkRegExp ( QString  value,
QString  pattern 
)
slot

Check regular expression.

void domainBim::CoreAPI::collectGeoObjects ( const QString &  IDList,
QList< model::IObject * > &  list 
)
protected

Collect geometric elements and composite elements.

QString domainBim::CoreAPI::compressToIfcGuid ( QString  id)
inlineslot
Parameters
cadID- An ID is expected in the format 4F3E15A2-0000-2A06-3133-323934363838
Returns
Encoded ID in IFC format (len = 22 characters)
Since
2.0.4, 11 oct 2016, jh
domainBim::CoreAPI::CoreAPI::CoreAPI ( BimProject *  bimPrj,
QObject *  parent = 0 
)

NOT AVAILABLE IN API

int domainBim::CoreAPI::countContainedElements ( QString  containerID,
int  maxDepth 
)
slot

Count objects contained in container with given ID. Travers recursively all contained elements and count them. Also counts containers.

Parameters
containerIDUnique ID of container
maxDepthMaximum Depth of hierarchy to be traversed
0 : count all elements
Since
1.0.20, 29 nov 2012, jh
QString domainBim::CoreAPI::createID ( )
inlineslot

Create a GUID. (Std Format).

QVariant domainBim::CoreAPI::evaluateFormula ( QString  code,
QString  id,
QString  id_otherdomain = QString() 
)
slot
Returns
Value of formula.
If an error occured a string is returned containing an error code:
ERROR#-1 - Could not find object 'id'
ERROR#-2 - Object other domain defined but not found
Since
2.0.3, 10 oct 2016, jh
Remarks
2.0.10, 07 mar 2017, jh, Moved from AutomationAPI to CoreAPI
QString domainBim::CoreAPI::format ( double  v,
int  dec = 2,
QString  frmt = "%L1",
int  fieldWidth = 10,
QChar  fillChar = QChar::Nbsp 
)
inlineslot

Format number.

Since
1.5.0, 17 aug 2015, jh
QString domainBim::CoreAPI::formatDateTime ( QDateTime  dt,
QString  formatstr = "iso" 
)
slot

Format date/time

Since
1.5.0, 17 aug 2015, jh
QString domainBim::CoreAPI::getApplicationDirectory ( )
slot
Since
1.0.17, 18 jul 2012, jh
QString domainBim::CoreAPI::getApplicationFilename ( )
slot
Since
2.0.15, 30 aug 2017, ar
QString domainBim::CoreAPI::getApplicationLanguage ( )
slot

Get current language of GUI.

Since
2.1.4, 27 nov 2017, jh
BimProject* domainBim::CoreAPI::getBimProject ( )

NOT AVAILABLE IN API
The global project which also provides access to the domain projects.

Since
1.5.0, 10 dec 2014, jh
QStringList domainBim::CoreAPI::getBoQItemsByObjectList ( QString  IDList)
slot

Get Bill of Quantities Items linked to Geometry Objects.

int domainBim::CoreAPI::getCalendarWeek ( QDateTime  dt)
slot

Get calendar week by date.

Since
1.5.0, 12 oct 2015, jh
QStringList domainBim::CoreAPI::getContainedElements ( QString  containerID,
int  maxDepth 
)
slot

Get list of objects contained in container with given ID. Traverses recursively all contained elements and append them to list. Also appends containers to list. If the object 'containerID' could not be found an empty list is returned.

Parameters
containerIDUnique ID of container
maxDepthMaximum Depth of hierarchy to be traversed
0 : get all elements
Since
1.0.18, 18 aug 2012, jh
QStringList domainBim::CoreAPI::getDocumentsByObjectList ( QString  IDList)
slot
Returns
List of document IDs.
Since
1.3.3, 03 apr 2014, jh

Equivalent call:

getLinkedObjects ( idList, "documents", "geometry" );
QString domainBim::CoreAPI::getDomainByElement ( QString  objID)
slot

Get domain by object.

Parameters
objIDLookup this object
Returns
domaintype as string, empty string if object could not be found

Example:

var selIdListStr = desiteAPI.getSelected('all');
var selIdList = selIdListStr.split(';');
for( var i=0; i<selIdList.length; i++ ) {
var id = selIdList[i];
if( id.length < 1 ) continue;
var p = desiteAPI.getDomainByElement( id );
console.log("Domain: " + p );
}
Since
2.0.7, 17 dec 2016, jh
model::IContainerObject* domainBim::CoreAPI::getIContainerObject ( const QString &  id,
model::eDomainType  domainFilter = model::typeDomainAll 
)
protected

Get object, looks up also containers in project

QStringList domainBim::CoreAPI::getLinkedObjects ( QString  objectIDList,
QString  resultDomains = "all",
QString  objectLookupDomains = "all" 
)
slot

Get objects which are linked to the given objects.
Results can be optionally restricted to specific domains. Passed IDs can be of any domain, but you can optionally use the third parameter to assert that they are of a specific domain or domains.

Parameters
objectIDListObjects to check the links of
resultDomains[optional] domain filter for linked objects to return. Can be a list (like 'geometry;activities'). Default is 'all'.
objectLookupDomains[optional] domain filter for the passed objects (link sources). The method looks up the objects in objectIDList only in these domains. Can also be a list. Default 'all'.
Returns
List of linked object IDs

Examples:

getLinkedObjects ( idList );

Returns all objects (any domain) linked to passed objects (also any domain).

getLinkedObjects ( idList, "geometry" );

Same as above, but only linked geometric objects are retrieved.

getLinkedObjects ( idList, "geometry", "activities" );

Same as above, but it is ensured that the passed IDs identify tasks (objects of domain Activities).

Note that you will rarely (if ever) need the third parameter as you usually know which kinds of IDs you're passing.

Since
1.0.18, 14 aug 2012, jh
Remarks
last modified 1.9.0, 19 may 2016, ah; reverse lookup
QString domainBim::CoreAPI::getLocation ( )
slot

Get geographic location of project.

Returns
location as JSON string.
QString domainBim::CoreAPI::getModelAsJson ( QString  modelId)
slot

Temporary function, for testing only!

QStringList domainBim::CoreAPI::getObjectsByDocumentList ( QString  IDList)
slot
Returns
List of object IDs.
Since
1.3.3, 03 apr 2014, jh

Equivalent call:

getLinkedObjects ( idList, "geometry", "documents" );
QStringList domainBim::CoreAPI::getObjectsByResourcesList ( QString  IDList)
slot
Returns
List of object IDs.
Since
1.5.0, 29 oct 2015, sl

Equivalent call:

getLinkedObjects ( idList, "geometry", "res" );
QStringList domainBim::CoreAPI::getObjectsBySectionList ( QString  IDList)
slot
Returns
List of object IDs.
Since
1.5.0, 29 oct 2015, sl

Equivalent call:

getLinkedObjects ( idList, "geometry", "building" );
QStringList domainBim::CoreAPI::getObjectsByTaskList ( QString  IDList)
slot
Returns
List of object IDs.
Since
1.0.18, 14 aug 2012, jh

Equivalent call:

getLinkedObjects ( idList, "geometry", "activities" );
QStringList domainBim::CoreAPI::getObjectsByTypeList ( QString  IDList)
slot

Get 3D objects which are linked to types (objects in domain 'types') given by an list of IDs.

Returns
IDList List of object IDs as string separeted by ';'
Since
1.5.0, 29 oct 2015, jh

Equivalent call:

getLinkedObjects ( idList, "geometry", "type" );
QStringList domainBim::CoreAPI::getOpenings ( QString  objID)
slot

Retrieves all opening objects (if any) for a given object. Openings are sub-elements of a given object.

Parameters
objIDObject for which to get openings of
Returns
List of opening object IDs
Since
1.5.0, 12 may 2015, ah
QString domainBim::CoreAPI::getParent ( QString  objID)
slot

Get ID of parent element of object with ID 'objID'. If object has no parent, an empty string will be returned.

Since
1.0.18, 18 aug 2012, jh
QStringList domainBim::CoreAPI::getParts ( QString  objID)
slot

Get IDs of parts (result of a cut) of object with ID 'objID'. If object has no parts, an empty array will be returned.

Parameters
objIDId of object
Returns
List with Ids of the parts
Since
1.5.0, 04 apr 2016, sl
QStringList domainBim::CoreAPI::getPcItemsByObjectList ( QString  IDList)
slot

Get links between process components and objects.

Since
2016
QVariantList domainBim::CoreAPI::getPointList ( QString  objID)
slot

Get points of object as JSON.

Parameters
idObject Id
var pointList = desiteAPI.getPointList( 'id123ABC' );
pointList = [ { x : 0.0, y : 0.0, z : 0.0 }, { x : 1.0, y : 1.0, z : 2.0 } ]
Since
1.9.1, 26 jul 2016, sl
QVariantMap domainBim::CoreAPI::getPointOnAlignmentAtStation ( QString  objID,
double  d 
)
slot

Get point on alignment at specified station length as JSON. If length > alignment length, the end point will be returned. Station start (may be greater than zero) will be substracted from d! Station start is not taken into account!

Parameters
objIDAlignment Object Id
dDistance from start
var point = desiteAPI.getPointOfAlignmentAtStation( 'id123ABC', 100.0 );
point = { x : 88.23, y : 27.41, z : 0.0 }
Since
2.0.10, 24 feb 2017, sl
QString domainBim::CoreAPI::getProjectDirectory ( )
slot
Since
1.0.17, 18 jul 2012, jh
QString domainBim::CoreAPI::getProjectID ( )
slot
Since
1.3.0, 21 oct 2013, jh
QString domainBim::CoreAPI::getProjectLongDescription ( )
slot
Since
1.0.17, 15 jun 2012, jh
QString domainBim::CoreAPI::getProjectName ( )
slot
Since
1.3.6, 26 apr 2014, jh
QString domainBim::CoreAPI::getProjectNumber ( )
slot
Since
1.0.17, 15 jun 2012, jh
QString domainBim::CoreAPI::getProjectShortDescription ( )
slot
Since
1.0.17, 15 jun 2012, jh
int domainBim::CoreAPI::getProjectVariantNumber ( )
slot
Since
1.3.0, 21 oct 2013, jh
QList<QDateTime> domainBim::CoreAPI::getPropertyDateList ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
protected
Since
1.9.0, 13 may 2016, jh
QVariantMap domainBim::CoreAPI::getPropertyDateListAsJSON ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get list of dates for a given property as JSON object

QDateTime domainBim::CoreAPI::getPropertyFirstDate ( QString  objID,
QString  propName,
QString  propType,
bool  inh 
)
slot
Since
1.9.0, 13 may 2016, jh
QDateTime domainBim::CoreAPI::getPropertyLastDate ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get last date/time of a property. If the property has no dates the current date/time is returned.

The dates are defined by the concatenation of the property name and the date seperated by an @.

Example:

status:Montage@2016-02-12
QVariant domainBim::CoreAPI::getPropertySource ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

If the property is a formula, return the formula. Otherwise the value is returned.

Since
1.9.0, 13 may 2016, jh
QList<QVariant> domainBim::CoreAPI::getPropertyTypeList ( QString  domain = "all",
QString  filterPattern = "*" 
)
slot

Get available property types for a given domain combination and a specified filter pattern.

Parameters
filterPatternFilter properties by name. Wildcards are supported.
var ptList = desiteAPI.getPropertyTypeList( 'activities', 'Cost4*' );

Example for return format:

[
{
"Name": "cpName",
"DataType": "xs:string",
"DisplayName": "cp:Name",
"Unit": "",
"Domain": "all"
},
{
"Name": "TEST-ATTR",
"DataType": "xs:double",
"DisplayName": "TEST-ATTR",
"Unit": "m",
"Domain": "activities"
}
]
Since
2.0.0
QList<QVariant> domainBim::CoreAPI::getPropertyTypeListByObject ( QString  objID,
QString  filterPattern = "*" 
)
slot

Get available property types for a given object ID and a specified filter pattern.

Parameters
objIDID of the object to look up property types for.
filterPatternFilter properties by name. Wildcards are supported.
var ptList = desiteAPI.getPropertyTypeListByObject( '3d16b4b7-4e1e-4d0f-8729-ed0e0c96e590', 'Cost4*' );

Example for return format:
Analogous to getPropertyTypeList()

Since
2.0.16, 17 oct 2017, ah
QVariantMap domainBim::CoreAPI::getPropertyTypeMetaData ( QString  pName,
QString  ptype 
)
slot

Get meta data of propertytype such as displayname and unit.

Parameters
pNameName of property type
pTypeDatatype of property type
Returns
JSON object containing meta data, if an errors occurs the JSON object contains a member ERROR and ERROR_NUMBER
Since
2.0.13, 13 may 2017
QVariantMap domainBim::CoreAPI::getPropertyTypesByDomain ( QString  domainName,
QString  filterPattern = "*" 
)
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Get available property types for a given domain combination.

Parameters
filterPatternFilter properties by name. Wildcards are supported.
var ptList = desiteAPI.getPropertyTypesByDomain( 'activities', 'Cost4*' );

Example for return format:

{
domain: "activities;geometry",
typelist : [
{
"pName": "cpName",
"pType": "xs:string"
},
{
"pName": "TEST-ATTR",
"pType": "xs:double"
}
]
}
Since
1.5.0, 26 jul 2015, jh
Deprecated:
Use getPropertyTypeList() instead.
QVariantMap domainBim::CoreAPI::getPropertyTypesByObject ( QString  objID,
QString  filterPattern = "*" 
)
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Get available property types for object 'objID'.

Parameters
filterPatternReturn only property types which name matches filterPattern
Returns
Available property types a array of JSON objects.

Example for return format:

{
id: "agdvsa$62A",
list : [
{
"pName": "cpName",
"pType": "xs:string",
"pUnit": "",
"pDomain": "geometry"
},
{
"pName": "cpVolume",
"pType": "xs:double",
"pUnit": "m3",
"pDomain": "geometry"
}
]
}
Since
1.5.0, 26 jul 2015, jh ; deprecated 2.0.16, 17 oct 2017
Deprecated:
Use getPropertyTypeListByObject() instead.
QString domainBim::CoreAPI::getPropertyUnit ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get unit of measurement (unit code).

Since
1.5.0, 23 sep 2015, jh
QVariant domainBim::CoreAPI::getPropertyValue ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get property value for a single object.

var id = desiteThis.ID();
var v = desiteAPI.getPropertyValue( id, 'cpVolume', 'xs:double' );

To access project properties use 'GlobalProject' as objID. Built-in properties can be retrieved as well as user defined properties.

Built-in global project properties:

- ShortDescription, xs:string
- LongDescription, xs:string
- NumberCode, xs:string
- ProjectDirectory, xs:string
- VariantNumber, xs:long
- ID, xs:ID
- ProjectUser, xs:string
- ProjectName, xs:string

Example

var prjname = desiteAPI.getPropertyValue( 'GlobalProject', 'ProjectName', 'xs:string' );
Parameters
inh: Check inherited property values. Default is 'true'
Since
1.0.16
QString domainBim::CoreAPI::getPropertyValueAsString ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Get property value for a single object. Convert result to 'string'. This method returns a valid result even if the property or the object does not exist.

Since
1.0.16 ; deprecated 1.9.0, 14 apr 2016
Deprecated:
Use AutomationAPI::getPropertyValues() instead!
QVariant domainBim::CoreAPI::getPropertyValueByDate ( QString  objID,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get a propertyValue at a specific date/time. The method returns the value of the last date/time before parameter datetime. If date is missiing the last date/time is used.

Example:

status:Production@2016-02-01 = 50.0
status:Production@2016-02-10 = 60.0
status:Production@2016-02-20 = 70.0
getPropertyValueByDate( 'objabc@2016-02-15', 'status:Production', 'xs:double' );
return => 60.0
getPropertyValueByDate( 'objabc@', 'status:Production', 'xs:double' );
return => 70.0
Since
1.9.0
QStringList domainBim::CoreAPI::getPropertyValueList ( QString  propName,
QString  propType,
int  maxValues 
)
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Get available property values for visible objects.

Since
1.0.17, 27 jun 2012, jh
Deprecated:
Use AutomationAPI::getPropertyValues() instead!
QString domainBim::CoreAPI::getPropertyValueRange ( QString  IDList,
QString  propName,
QString  propType,
QString  domainFilter = "geometry" 
)
slot

Get property values/range for a list of objects for specified domain(s).
The values are concatenated and separated by ';'.

Since
1.0.16
Remarks
modified 1.5.0, 30 mar 2016, sl
QStringList domainBim::CoreAPI::getResourcesByObjectList ( QString  IDList)
slot
Returns
List of resources.
Since
1.5.0, 29 oct 2015, sl

Equivalent call:

getLinkedObjects ( idList, "res", "geometry" );
QStringList domainBim::CoreAPI::getSectionsByObjectList ( QString  IDList)
slot
Returns
List of building structure sections IDs.
Since
1.5.0, 29 oct 2015, sl

Equivalent call:

getLinkedObjects ( idList, "building", "geometry" );
double domainBim::CoreAPI::getStationOfProjectedPoint ( QString  objID,
double  x,
double  y,
double  z = 0.0 
)
slot

Get station (distance from start) of point on alignment. If point is not part of alignment, it will be projected on alignment first! Station start is not taken into account!

Parameters
objIDAlignment Object Id
xx-coordinate of point to check
yy-coordinate of point to check
zz-coordinate of point to check (optional)
Returns
Distance from alignment start
Since
2.0.10, 07 mar 2017, sl
QStringList domainBim::CoreAPI::getTasksByObjectList ( QString  IDList)
slot

Get tasks which are linked to 3D objects.

Returns
List of task IDs.
Since
1.0.17, 16 jun 2012, jh

Equivalent call:

getLinkedObjects ( idList, "activities", "geometry" );
QStringList domainBim::CoreAPI::getTypesByObjectList ( QString  IDList)
slot
Returns
List of types.
Since
1.5.0, 29 oct 2015, sl

Equivalent call:

getLinkedObjects ( idList, "type", "geometry" );
QString domainBim::CoreAPI::getUserName ( )
slot
Since
1.0.17, 15 jun 2012, jh
bool domainBim::CoreAPI::isLocked ( QString  objID)
slot

Check if an object is locked.

Since
1.9.0, 13 may 2016, ar
bool domainBim::CoreAPI::isPropertyInherited ( QString  objID,
QString  propName,
QString  propType 
)
slot

Check if a property value is inherited.

Since
1.3.5, 21 apr 2014, jh
bool domainBim::CoreAPI::isSelected ( QString  objID)
slot

Check if an object is selected.

Since
1.0.20, 24 nov 2012, jh
bool domainBim::CoreAPI::isVisible ( QString  objID)
slot

Objects status which can be visible/hidden, selected/unselected, wireframed, blocked.

Check if an object is visible.

Since
1.0.20, 24 nov 2012, jh
bool domainBim::CoreAPI::isWired ( QString  objID)
slot

Check if an object is in wireframe mode.

Since
1.9.0, 13 may 2016, ar
QString domainBim::CoreAPI::prepareJsCode ( QString  code,
QString  id,
int  dec = -1,
QString  frmt = "%L1",
int  fieldWidth = 10,
QChar  fillChar = QChar() 
)
slot

Prepare JavaScript code by replacing variables.

Parameters
decNumber of decimals, -1 = all decimals
Since
2.0.14, 12 jul 2017, jh
bool domainBim::CoreAPI::requireVersion ( int  MAJOR,
int  MINOR,
int  BUILD 
)
slot

Returns true if version of current application is equal or higher than required.

QString domainBim::CoreAPI::timeStamp ( QString  format = QString())
slot

If format is empty, get current date/time in format: yyyy-MM-ddThh-mm-ss.

If format = 'ISO' timestamped is formated as ISO format (yyyy-MM-ddThh:mm:ss), otherwise format specifies the format of the returned time.

Since
1.0.18, 14 jun 2012, jh
QString domainBim::CoreAPI::uncompressFromIfcGuid ( QString  ifcGuid)
inlineslot
Parameters
ifcGuid- Encoded ID in IFC format (len = 22 characters)
Returns
ID in the format: 4F3E15A2-0000-2A06-3133-323934363838
Since
2.0.4, 11 oct 2016, jh

The documentation for this class was generated from the following file:

Created: Mon Dec 11 2017 05:07:34