MainPage   Related pages 
Static Public Attributes | 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 calcModelCoordsByGpsCoords (double lat, double lon)
 
QVariantMap calcGkCoordsByGpsCoords (double lat, double lon)
 
QVariantMap calcGpsCoordsByGkCoords (double rw, double hw)
 
QString idListToStr (QStringList idList)
 
QStringList strToIdList (QString strIDList)
 
TOOLS - FILES
QVariantMap getFileInfo (QString filePath)
 
QString getAbsolutePath (QString filePath)
 
QString getBaseName (QString filePath)
 
QString getFileName (QString filePath)
 
APPLICATION
QString getApplicationDirectory ()
 
QString getApplicationFilename ()
 
virtual QString getApplicationLanguage ()
 
QString getVersionAsString ()
 
int getVersionMAJOR ()
 
int getVersionMINOR ()
 
int getVersionBUILD ()
 
QVariantMap getVersion ()
 
bool requireVersion (int major, int minor, int patch)
 
PROJECT
QString getUserName ()
 
QString getProjectID ()
 
int getProjectVariantNumber ()
 
int getProjectVersionNumber ()
 
QString getProjectNumber ()
 
int setProjectNumber (QString s, bool overwriteExisting=false)
 
QString getProjectName ()
 
QString getProjectShortDescription ()
 
int setProjectShortDescription (QString s, bool overwriteExisting=false)
 
QString getProjectLongDescription ()
 
int setProjectLongDescription (QString s, bool overwriteExisting=false)
 
QString getProjectDirectory ()
 
QString getLocation ()
 
QVariantMap getProjectLocation () const
 
QVariantMap getCloudSettings ()
 
QVariantMap getProjectInfo ()
 
DOMAINS
QString getDomainByElement (QString objId)
 
PROPERTIES
QVariant getPropertyValue (QString objId, QString propName, QString propType, bool inh=true)
 
QList< QVariant > getPropertyValuesByObject (QString objId, QString filterpattern="*")
 
QVariant getPropertySource (QString objId, QString propName, QString propType, bool inh=true)
 
QString getPropertyUnit (QString objId, QString propName, QString propType, bool inh=true)
 
QString getPropertyUnit (QString propName, QString propType)
 
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)
 
QVariantList getPropertyDateList (QString objectId, QString propertyBaseName, QString propertyType)
 
QVariantMap getPropertyTypesByObject (QString objId, QString filterPattern="*")
 
QVariantMap getPropertyTypesByDomain (QString domainName, QString filterPattern="*")
 
QVariantMap getPropertyTypeMetaData (QString propName, QString propType)
 
QList< QVariant > getPropertyTypeList (QString domain="all", QString filterPattern="*", bool activeOnly=false)
 
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())
 
QStringList extractPropertyNames (const QString &code, const QString &startTag="[[", const QString &endTag="]]")
 
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, bool loadExternal=true)
 
int countContainedElements (QString containerId, int maxDepth, bool loadExternal=true)
 
QString getParent (QString objId)
 
QStringList getOpenings (QString objId)
 
QStringList getParts (QString objId)
 
STATUS
bool isVisible (QString objId)
 
bool isSelected (QString objId)
 
bool isLocked (QString objId)
 
bool isWired (QString objId)
 
GEOMETRY
QVariantList getPointList (QString objId)
 
ALIGNMENTS / REGIONS
QVariantMap getPointOnAlignmentAtStation (QString alignmentId, double d)
 
double getStationOfProjectedPoint (QString alignmentId, double x, double y, double z=0.0)
 
QStringList getRegionsOfAlignment (QString alignmentId)
 
QVariantList getRangesOfRegion (QString alignmentID, QString regionID)
 
double getValueOfAlignmentRegion (QString alignmentID, QString regionID)
 
ACTIVITIES
int getTaskMode (QString taskID)
 
QString getTaskVisualisation (QString taskID)
 
QString getTaskRestrictionsByTask (QString taskID)
 
LINKRULES
int updateRuleBasedLinks (QString domainName, bool visibleOnly=false)
 
int removeRuleBasedLinks (QString domainName)
 

Static Public Attributes

static bool BLOCK_UNSAFE
 

Detailed Description

This class provides API functions on level 1 which provides the calculation of object properties as well as convenience 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 6077 2022-03-22 11:30:05Z stefan.losch

(c) ceapoint aec technologies GmbH

Member Function Documentation

◆ addDays

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

Add days to a given date.

Parameters
dateStrDate to add days to, in ISO format (yyyy-MM-dd)
nrDaysNumber of days to add
Returns
Calculated new date in ISO format (yyyy-MM-dd)
Since
1.0.16

◆ calcGkCoordsByGpsCoords

QVariantMap domainBim::CoreAPI::calcGkCoordsByGpsCoords ( double  lat,
double  lon 
)
slot

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

Returns
JSON object which contains the coordinate values H ("Hochwert"; northing), R ("Rechtswert"; easting) and Z (height).

Example:

{
var obj = desiteAPI.calcGkCoordsByGpsCoords(22.402491, 71.016991, 10.0);
JSON.stringify(obj, undefined, 2);
}
Returns
{
"H": 5700071.016991,
"R": 2570022.402491,
"Z": 10
}
\since 2.0
/
QVariantMap calcGkCoordsByModelCoords( double x, double y, double z );
QVariantMap calcModelCoordsByGkCoords( double r, double h );
JSON object which contains the coordinate values H ("Hochwert"; northing) and R ("Rechtswert"; easting).
{
"H": 3909631.600654817,
"R": 11924723.272716647
}
Since
2.0.19, 02 mar 2018, jh

◆ calcGpsCoordsByGkCoords

QVariantMap domainBim::CoreAPI::calcGpsCoordsByGkCoords ( double  rw,
double  hw 
)
slot

Returns GPS coordinates as JSON object.

Example:

{
var obj = desiteAPI.calcGpsCoordsByGkCoords(11924723.272716647, 3909631.600654817);
JSON.stringify(obj, undefined, 2);
}
Returns
{
"Lat": 35.23028571362665,
"Lon": 37.6603185283756
}
Since
2.0.19, 02 mar 2018, jh

◆ calcGpsCoordsByModelCoords

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

Calculate global GPS coordinates 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.

Example:

{
var obj = desiteAPI.calcGpsCoordsByModelCoords(11924723.272716647, 3909631.600654817);
JSON.stringify(obj, undefined, 2);
}
Returns
{
"Lat": 86.49242657261553,
"Lon": 41.17570237573105
}
Since
2.0

◆ calcGpsCoordsByStation

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 hierarchy until an object of type 'typeBsAlignment' is 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:

{
var obj = desiteAPI.calcGpsCoordsByStation("{16e8fe62-6af7-4b9c-8598-479d310bea1e}-59", 37);
JSON.stringify(obj, undefined, 2);
Lon: 0,
Lat: 0,
Error: -1
}
Since
1.9.0, 19 may 2016, mm

◆ calcHashcode

long domainBim::CoreAPI::calcHashcode ( QString  str)
slot

Calculate hashcode from a given string.

Since
2.1.4, 15 nov 2017, jh

◆ calcModelCoordsByGpsCoords

QVariantMap domainBim::CoreAPI::calcModelCoordsByGpsCoords ( double  lat,
double  lon 
)
slot

Calculate global Gauss-Krueger coordinates from GPS coordinates.

Example:

{
var obj = desiteAPI.calcModelCoordsByGpsCoords(23.0,50.0);
JSON.stringify(obj, undefined, 2);
}
Returns
{
"X": 6674573.942654451,
"Y": -2672725.3777886564
}
Since
2.0.19, 02 mar 2018, jh

◆ calcSlantedArea

double domainBim::CoreAPI::calcSlantedArea ( QString  objId,
double  angleMin = 0.0,
double  angleMax = 45.0 
)
slot

Calculate the up-facing surface area of an object that is slanted by a given angle (e.g ramps or roofs).
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

◆ checkRegExp

bool domainBim::CoreAPI::checkRegExp ( QString  value,
QString  pattern 
)
slot

Check regular expression. Wildcards are enabled.

Examples:

var value = 'DESITE MD';
var pattern1 = "DES*";
var pattern2 = "dES*";
console.log( "CHECK 1: " + desiteAPI.checkRegExp( value, pattern1) ); // returns true
console.log( "CHECK 2: " + desiteAPI.checkRegExp( value, pattern2) ); // return false
Since
2.0.x, jh

◆ compressToIfcGuid

QString domainBim::CoreAPI::compressToIfcGuid ( QString  id)
slot
Parameters
ID- An ID is expected in the format 4F3E15A2-0000-2A06-3133-323934363838

Example:

{
desiteAPI.compressToIfcGuid("16e8fe62-6af7-4b9c-8598-479d310bea1e");
}
Returns
ID in IFC format (base64 encoded, 22 characters)
(from the example above)
0MwFvYQlTBd8MOHvqn2_eU
Since
2.0.4, 11 oct 2016, jh

◆ countContainedElements

int domainBim::CoreAPI::countContainedElements ( QString  containerId,
int  maxDepth,
bool  loadExternal = true 
)
slot

Recursively count objects (and containers) in container with given ID.

Parameters
containerIdUnique ID of container
maxDepthMaximum Depth of hierarchy to be traversed, 0 for unlimited
loadExternalLoad external data of container with given ID if storage type is external and content type is undefined (default: true). Note: Does not work for nested external storage types yet.
Since
1.0.20, 29 nov 2012, jh
2.6.1, 06 aug 2020, sl: added loading of external stored data (clash runs and selection sets)

◆ createID

QString domainBim::CoreAPI::createID ( )
slot

Create a GUID.

Since
2.0

◆ evaluateFormula

QVariant domainBim::CoreAPI::evaluateFormula ( QString  code,
QString  id,
QString  id_otherdomain = QString() 
)
slot

Evaluate formula with JavaScript, similar to what you can do in a property.

Parameters
codeFormula code
idObject which is used to get property values in variables such as [[cpPercentComplete##xs:double]]
id_otherdomainObject of other domain (yet only domain 'geometry' is supported), e.g. a linked object, the variables must contain the domain. Example: [[cpVolume##xs:double##geometry]]
Returns
Value of formula.
If an error occurred, a string is returned containing an error code:
ERROR#-1 - Could not find object 'id'
ERROR#-2 - Object of other domain not found
ERROR#-3 - Could not get project of object 'id'

Example #1:

var id = '8b5721f3-e2ad-4e2c-b797-ded155fb50e5'; // object
var vol = desiteAPI.getPropertyValue(id, 'cpVolume', 'xs:double');
var code = "1 + [[cpVolume##xs:double]] * Math.sqrt(2)";
var res = desiteAPI.evaluateFormula(code, id);
console.log("Volume: " + vol); // 2.812511618900961
console.log("Result: " + res); // 4.977492075781649

Example #2 (with other domain):

var id = '0943368f-5091-4c45-84b7-76bf0ffcfd38'; // task
var id_otherdomain = '8b5721f3-e2ad-4e2c-b797-ded155fb50e5'; // object
var pcc = desiteAPI.getPropertyValue( id, 'cpPercentComplete', 'xs:double' );
var vol = desiteAPI.getPropertyValue( id_otherdomain, 'cpVolume', 'xs:double' );
var code = "[[cpPercentComplete##xs:double]] * [[cpVolume##xs:double##geometry]]";
var res = desiteAPI.evaluateFormula(code, id, id_otherdomain);
console.log("PercentComplete: " + pcc); // 0.8
console.log("Volume: " + vol); // 2.812511618900961
console.log("RESULT: " + res); // 2.2500092951207686
Since
2.0.3, 10 oct 2016, jh
Remarks
2.0.10, 07 mar 2017, jh, Moved from AutomationAPI to CoreAPI

◆ extractPropertyNames

QStringList domainBim::CoreAPI::extractPropertyNames ( const QString &  code,
const QString &  startTag = "[[",
const QString &  endTag = "]]" 
)
slot

Extract variables/properties from a formula/code. A property is enclosed by a start tag and an end tag. By default start tag = '[[' and end tag is ']]'. A property consists of a name and a data type separated by ##.

Example:

=SUMLINKED( [[cpVolume##xs:double]] * 1.1 )

Result:

cpVolume##xs:double
Since
2.5.2, 16 sep 2019, jh

◆ format

QString domainBim::CoreAPI::format ( double  v,
int  dec = 2,
QString  frmt = "%L1",
int  fieldWidth = 10,
QChar  fillChar = QChar::Nbsp 
)
inlineslot

Formats the parameter number v.
Example:

{
desiteAPI.format(4);
}
Returns
4,00
Since
1.5.0, 17 aug 2015, jh

◆ formatDateTime

QString domainBim::CoreAPI::formatDateTime ( QDateTime  dt,
QString  formatstr = "iso" 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Format date/time

Parameters
dtDate/Time to format (The format of QDateTime must be as in the example below:)
formatstrFormat string. Could be a format string such as YYYY-MM-DD or the predefined format 'iso'.

Example format strings:

dd.MM.yyyy 21.05.2001
ddd MMMM d yy Tue May 21 01
hh:mm:ss.zzz 14:13:09.042
h:m:s ap 2:13:9 pm

Example code:

var dt = new Date('Tue, 05 FEB 2009 09:09:00 GMT-0400');
desiteAPI.formatDateTime(dt);
2009-02-05T14:09:00

Important note: When used in a WebForm, the returned string will always be in Zulu format. For above example:

2009-02-05T13:09:00Z
Since
1.5.0, 17 aug 2015, jh
Remarks
Deprecated since 2.7.1, 2020-11-24
Deprecated:
Use JavaScript core functionality instead, for instance dt.toISOString().
Reason: Inconsistent behavior in scripts and WebForms. Not really DESITE-related.

◆ getAbsolutePath

QString domainBim::CoreAPI::getAbsolutePath ( QString  filePath)
slot
Returns
A file's absolute path. This doesn't include the file name.

Example: C:/test/myTextFile.txt -> C:/test

Since
2.0.18, 31 jan 2018, jh

◆ getApplicationDirectory

QString domainBim::CoreAPI::getApplicationDirectory ( )
slot
Returns
The path of the directory in which the application file is included.
Since
1.0.17, 18 jul 2012, jh

◆ getApplicationFilename

QString domainBim::CoreAPI::getApplicationFilename ( )
slot
Returns
The filename of the application.
Since
2.0.15, 30 aug 2017, ar

◆ getApplicationLanguage

virtual QString domainBim::CoreAPI::getApplicationLanguage ( )
virtualslot
Returns
The current language of the GUI.
Since
2.1.4, 27 nov 2017, jh

◆ getBaseName

QString domainBim::CoreAPI::getBaseName ( QString  filePath)
slot
Returns
The base name of the file. The base name consists of all characters in the file up to (but not including) the first '.' character.

Example: C:/test/myTextFile.txt -> myTextFile

Since
2.0.18, 31 jan 2018, jh

◆ getBoQItemsByObjectList

QStringList domainBim::CoreAPI::getBoQItemsByObjectList ( QString  idList)
slot

Get Bill of Quantities Items linked to Geometry Objects.

Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "boq", "geometry" );

◆ getCalendarWeek

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

Get calendar week by date. The format of QDateTime must be as in the following example:

Example:

var dt = new Date('Tue, 05 FEB 2009 09:09:00 GMT-0400');
desiteAPI.getCalendarWeek(dt);
Since
1.5.0, 12 oct 2015, jh

◆ getCloudSettings

QVariantMap domainBim::CoreAPI::getCloudSettings ( )
slot

Get URL, User Example:

{
var obj = desiteAPI.getCloudSettings();
JSON.stringify(obj);
}
Returns
{"Password":"","Url":"","User":""}
Since
2.2.3, 20 sep 2018, jh

◆ getContainedElements

QStringList domainBim::CoreAPI::getContainedElements ( QString  containerId,
int  maxDepth,
bool  loadExternal = true 
)
slot

Get a list of objects contained in the container with the given ID.
All contained containers are traversed recursively and appended to the list as well. If the object 'containerId' could not be found, an empty list is returned.

Parameters
containerIdUnique ID of container
maxDepthMaximum depth of the hierarchy to be traversed, 0 for unlimited
loadExternalLoad external data of container with given ID if storage type is external and content type is undefined (default: true). Note: Does not work for nested external storage types yet.
Since
1.0.18, 18 aug 2012, jh
2.6.1, 06 aug 2020, sl: added loading of external stored data (clash runs and selection sets)

◆ getDocumentsByObjectList

QStringList domainBim::CoreAPI::getDocumentsByObjectList ( QString  idList)
slot
Returns
List of document IDs.
Since
1.3.3, 03 apr 2014, jh
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "documents", "geometry" );

◆ getDomainByElement

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

◆ getFileInfo

QVariantMap domainBim::CoreAPI::getFileInfo ( QString  filePath)
slot
Returns
AbsolutePath, BaseName, Created, FileName, IsDir, IsFile, LastModified, LastRead, Suffix

Example:

var obj = desiteAPI.getFileInfo('C:\windows\System32\Boot\winresume.exe');
var keys = Object.keys(obj);
keys;
Since
2.1.06, 02 mar 2018, jh

◆ getFileName

QString domainBim::CoreAPI::getFileName ( QString  filePath)
slot
Returns
The name of the file, excluding the path.

Example: C:/test/myTextFile.txt -> myTextFile.txt

Since
2.0.18, 31 jan 2018, jh

◆ getLinkedObjects

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

Get objects which are linked to 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. Note that all passed IDs must be valid or the returned list will be empty.
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:

var objList = desiteAPI.getLinkedObjects(idList);
Returns
All objects (any domain) linked to passed objects (also any domain).
var objList = desiteAPI.getLinkedObjects(idList, "geometry");

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

var objList = desiteAPI.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
1.9.0, 19 May 2016 : reverse lookup

◆ getLocation

QString domainBim::CoreAPI::getLocation ( )
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get geographic location of project.

Returns
Location as JSON string. Use JSON.parse() to convert to Object.

Example return value:

"{\"globalRefPoint\": [0,0,0],\"lat\": 0,\"lon\": 0,\"modelRefPoint\": [0,0,0],\"projectRefPoint\": [0,0,0],\"rotation\": 0}"
Remarks
Deprecated since 2.2.1, 02 Aug 2018
Deprecated:
Use getProjectLocation() instead.
Reason: Return as String is inconvenient.

◆ getObjectsByBoQItemList

QStringList domainBim::CoreAPI::getObjectsByBoQItemList ( QString  idList)
slot
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "boq" );

◆ getObjectsByDocumentList

QStringList domainBim::CoreAPI::getObjectsByDocumentList ( QString  idList)
slot
Returns
List of object IDs.
Since
1.3.3, 03 apr 2014, jh
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "documents" );

◆ getObjectsByPcItemList

QStringList domainBim::CoreAPI::getObjectsByPcItemList ( QString  idList)
slot

Get links between process components and objects.

Since
2016
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "pc" );

◆ getObjectsByResourcesList

QStringList domainBim::CoreAPI::getObjectsByResourcesList ( QString  idList)
slot
Returns
List of object IDs.
Since
1.5.0, 29 oct 2015, sl
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "res" );

◆ getObjectsBySectionList

QStringList domainBim::CoreAPI::getObjectsBySectionList ( QString  idList)
slot
Returns
List of object IDs.
Since
1.5.0, 29 oct 2015, sl
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "building" );

◆ getObjectsByTaskList

QStringList domainBim::CoreAPI::getObjectsByTaskList ( QString  idList)
slot
Returns
List of object IDs.
Since
1.0.18, 14 aug 2012, jh
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "activities" );

◆ getObjectsByTypeList

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
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "geometry", "type" );

◆ getOpenings

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

◆ getParent

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

◆ getParts

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

◆ getPcItemsByObjectList

QStringList domainBim::CoreAPI::getPcItemsByObjectList ( QString  idList)
slot

Get links between process components and objects.

Since
2016
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "pc", "geometry" );

◆ getPointList

QVariantList domainBim::CoreAPI::getPointList ( QString  objId)
slot

Get points of object as JSON.

Parameters
objIdID of geometric element
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

◆ getPointOnAlignmentAtStation

QVariantMap domainBim::CoreAPI::getPointOnAlignmentAtStation ( QString  alignmentId,
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 is not taken into account and has to be substracted from d. See desiteAPI.getPropertyValue(alignmentId, "Alignment:StationStart", "xs:double");

Parameters
alignmentIdAlignment 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

◆ getProjectDirectory

QString domainBim::CoreAPI::getProjectDirectory ( )
slot
Returns
The directory of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.0.17, 18 jul 2012, jh

◆ getProjectID

QString domainBim::CoreAPI::getProjectID ( )
slot
Returns
The ID of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.3.0, 21 oct 2013, jh

◆ getProjectInfo

QVariantMap domainBim::CoreAPI::getProjectInfo ( )
slot

Get project informations as JavaScript object. If no project is opened, most values will be empty.

Returns
{
"CloudPassword":"",
"CloudUrl":{},
"CloudUser":"",
"ErrorMessage":"",
"ExpireCode":"",
"FileName":"",
"ID":"03619e29-5faa-4a7b-964e-910557c1cde1",
"LongDescription":"",
"NumberCode":"",
"ProjectRecID":"",
"SavedBy":"",
"SavedTimestamp":"",
"SavedWithVersion":"",
"ShortDescription":"",
"ThumbData":"",
"VariantRecID":"",
"VersionNumber":0
}
Since
2.2.3, 20 sep 2018, jh

◆ getProjectLocation

QVariantMap domainBim::CoreAPI::getProjectLocation ( ) const
slot

Get geographic location of a project.

Returns
Location as JavaScript object.
{"globalRefPoint": [0,0,0],"lat": 0,"lon": 0,"modelRefPoint": [0,0,0],"projectRefPoint": [0,0,0],"rotation": 0}
Since
2.2

◆ getProjectLongDescription

QString domainBim::CoreAPI::getProjectLongDescription ( )
slot
Returns
The long description of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.0.17, 15 jun 2012, jh

◆ getProjectName

QString domainBim::CoreAPI::getProjectName ( )
slot
Returns
The name of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.3.6, 26 apr 2014, jh

◆ getProjectNumber

QString domainBim::CoreAPI::getProjectNumber ( )
slot
Returns
The number of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.0.17, 15 jun 2012, jh

◆ getProjectShortDescription

QString domainBim::CoreAPI::getProjectShortDescription ( )
slot
Returns
The short description of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.0.17, 15 jun 2012, jh

◆ getProjectVariantNumber

int domainBim::CoreAPI::getProjectVariantNumber ( )
slot
Returns
The variant number of the currently opened project. If no project is opened, then there will be an empty string.
Since
1.3.0, 21 oct 2013, jh

◆ getProjectVersionNumber

int domainBim::CoreAPI::getProjectVersionNumber ( )
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get Project Version Number.

Since
2.2.1, 03 aug 2018, jh
Remarks
Deprecated since 2.3.1, 17 Dec 2018
Deprecated:
DESITE Projects no longer have a version number; this method will always return 0.

◆ getPropertyDateList

QVariantList domainBim::CoreAPI::getPropertyDateList ( QString  objectId,
QString  propertyBaseName,
QString  propertyType 
)
slot

Get a list of dates for a given property.

If a time is not specified for a certain property the time is set to 12:00 by default. (Consider the time shift to your local time.)

Parameters
propertyBaseNameName of the Property Type without the date suffix.
For example, if you have "myProp@2019-08-13" and "myProp@2019-08-12", pass "myProp" ("myProp@" will also work).
Returns
sorted list of valid dates

Example

var id = "...anyID...";
// set some values ...
desiteAPI.setPropertyValue( id, "test@2019-01-01", "xs:long", 23 )
desiteAPI.setPropertyValue( id, "test@2019-01-10", "xs:long", 14 )
desiteAPI.setPropertyValue( id, "test@2019-01-15T14:00:00.000Z", "xs:long", 14 )
var v = desiteAPI.getPropertyDateList( id, "test", "xs:long");
console.log( JSON.stringify(v,true,3) );

Output:

[
"2019-01-01T11:00:00.000Z",
"2019-01-10T11:00:00.000Z",
"2019-01-15T14:00:00.000Z"
]
Since
2.5.2, 2019-08-27, ah, jh

◆ getPropertyDateListAsJSON

QVariantMap domainBim::CoreAPI::getPropertyDateListAsJSON ( QString  objId,
QString  propName,
QString  propType,
bool  inh = true 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get list of dates for a given property as JSON object.
If a time is not specified for a certain property the time is set to 12:00 by default. (Consider the time shift to your local time.)

Example

var id = "...anyID...";
// set some values ...
desiteAPI.setPropertyValue( id, "test@2019-01-01", "xs:long", 23 )
desiteAPI.setPropertyValue( id, "test@2019-01-10", "xs:long", 14 )
desiteAPI.setPropertyValue( id, "test@2019-01-15T14:00:00.000Z", "xs:long", 14 )
var v = desiteAPI.getPropertyDateListAsJSON( id, "test", "xs:long");
console.log( JSON.stringify(v,true,3) );
var ptlist = desiteAPI.getPropertyTypeListByObject( id, "te*" );
console.log( JSON.stringify(ptlist,true,3) );

Output:

{
"list": [
"2019-01-01T11:00:00.000Z",
"2019-01-10T11:00:00.000Z",
"2019-01-15T14:00:00.000Z"
]
}
[
{
"DataType": "xs:long",
"DisplayName": "test@2019-01-01",
"Domain": "geometry",
"Name": "test@2019-01-01",
"Unit": ""
},
{
"DataType": "xs:long",
"DisplayName": "test@2019-01-10",
"Domain": "geometry",
"Name": "test@2019-01-10",
"Unit": ""
},
{
"DataType": "xs:long",
"DisplayName": "test@2019-01-15T14:00:00.000Z",
"Domain": "geometry",
"Name": "test@2019-01-15T14:00:00.000Z",
"Unit": ""
}
]
Since
2.0
Remarks
Deprecated since 2.5.2, 2019-08-27
Deprecated:
Use getPropertyDateList() instead.
Reason: Does not handle invalid dates. Does not actually return JSON. Parameter "inh" has no effect.

◆ getPropertyFirstDate

QDateTime domainBim::CoreAPI::getPropertyFirstDate ( QString  objId,
QString  propName,
QString  propType,
bool  inh 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.
Returns
The first 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 separated by an .

Example:

status:Montage@2016-02-12
Since
1.9.0, 2016-05-13, jh
Remarks
Deprecated since 2.5.2, 2019-08-27
Deprecated:
Use getPropertyDateList() and take first entry.

◆ getPropertyLastDate

QDateTime domainBim::CoreAPI::getPropertyLastDate ( QString  objId,
QString  propName,
QString  propType,
bool  inh = true 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

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 separated by an @.

Example:

status:Montage@2016-02-12
Since
1.9.0, 2016-05-13, jh
Remarks
Deprecated since 2.5.2, 2019-08-27
Deprecated:
Use getPropertyDateList() and take last entry.

◆ getPropertySource

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

◆ getPropertyTypeList

QList<QVariant> domainBim::CoreAPI::getPropertyTypeList ( QString  domain = "all",
QString  filterPattern = "*",
bool  activeOnly = false 
)
slot

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

Parameters
domainDomain or domains (semicolon-separated) for lookup (default "all")
filterPatternFilter properties by name. Wildcards are supported.
activeOnlyIf set to true, the returned list will only contain Property Types which are active in at least one of the given domains.
var ptList = desiteAPI.getPropertyTypeList( 'activities', 'TEST*' );

Example for return format:

[
{
"DataType": "xs:string",
"DisplayName": "TEST:TEXT",
"Domain": "all",
"Name": "TESTTEXT",
"Unit": ""
},
{
"DataType": "xs:double",
"DisplayName": "TEST-ATTR",
"Domain": "activities",
"Name": "TEST-ATTR",
"Unit": "m"
}
]
Since
2.0.0
2.6.1, 2020-08-27, ah : optional parameter "activeOnly"

◆ getPropertyTypeListByObject

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 taskId = '3d16b4b7-4e1e-4d0f-8729-ed0e0c96e590';
var ptList = desiteAPI.getPropertyTypeListByObject( taskId, 'TEST*' );

Example for return format:
Analogous to getPropertyTypeList() :

[
{
"DataType": "xs:string",
"DisplayName": "TEST:TEXT",
"Domain": "all",
"Name": "TESTTEXT",
"Unit": ""
},
{
"DataType": "xs:double",
"DisplayName": "TEST-ATTR",
"Domain": "activities",
"Name": "TEST-ATTR",
"Unit": "m"
}
]
Since
2.0.16, 17 oct 2017, ah
Remarks
2.4.8, 30 jan 2020, sl: fixed an error concerning inherited project repository properties

◆ getPropertyTypeMetaData

QVariantMap domainBim::CoreAPI::getPropertyTypeMetaData ( QString  propName,
QString  propType 
)
slot

Get meta data of property type such as display name and unit.

Parameters
pNameName of property type
pTypeData type of property type
Returns
Object containing property type meta data. If an errors occurs, the object contains ERROR and ERROR_NUMBER.
{
"DataType" : "xs:string",
"DisplayName" : "cp:Name",
"Domain" : 'all',
"Inheritable" : false,
"Name" : "cpName",
"Unit" : ''
}
Since
2.0.13, 13 May 2017
2.8.7, 22 Mar 2022: added option 'Inheritable'

◆ getPropertyTypesByDomain

QVariantMap domainBim::CoreAPI::getPropertyTypesByDomain ( QString  domainName,
QString  filterPattern = "*" 
)
slot
Deprecated:
This method will be removed in future versions of DESITE 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",
list: [
{
"pName": "cpName",
"pType": "xs:string"
},
{
"pName": "TEST-ATTR",
"pType": "xs:double"
}
]
}
Since
1.5.0, 26 jul 2015, jh
Remarks
Deprecated since 2.0.16, 17 Oct 2017
Deprecated:
Use getPropertyTypeList() instead.

◆ getPropertyTypesByObject

QVariantMap domainBim::CoreAPI::getPropertyTypesByObject ( QString  objId,
QString  filterPattern = "*" 
)
slot
Deprecated:
This method will be removed in future versions of DESITE 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
Remarks
deprecated since 2.0.16, 17 oct 2017
Deprecated:
Use getPropertyTypeListByObject() instead.

◆ getPropertyUnit [1/2]

QString domainBim::CoreAPI::getPropertyUnit ( QString  objId,
QString  propName,
QString  propType,
bool  inh = true 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get unit of measurement (unit code).

Since
1.5.0, 23 sep 2015, jh
Remarks
Deprecated since 2.2.1, 26 Jun 2018
Deprecated:
Use getPropertyUnit( QString propName, QString propType ) instead.
Reason: Irrelevant parameters.

◆ getPropertyUnit [2/2]

QString domainBim::CoreAPI::getPropertyUnit ( QString  propName,
QString  propType 
)
slot

Get unit of measurement (unit code)

Since
2.2.1, 26 jun 2018, jh

◆ getPropertyValue

QVariant domainBim::CoreAPI::getPropertyValue ( QString  objId,
QString  propName,
QString  propType,
bool  inh = true 
)
slot

Get property value for a loop of visible objects.

var vis = desiteAPI.getVisibleElements('geometry');
for (var i = 0; i < vis.length ; i++) {
var vol = desiteAPI.getPropertyValue( vis[i], 'cpVolume', 'xs:double' );
if (vol == undefined) continue;
console.log(vol);
}

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, 2.7.3 2021-01-13 ek: Example corrected

◆ getPropertyValueAsString

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 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
Remarks
Deprecated since 1.9.0, 14 Apr 2016
Deprecated:
Use AutomationAPI::getPropertyValues() instead.

◆ getPropertyValueByDate

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 the given timestamp. If no timestamp is given, the latest value is returned.

Example:

status:Production@2016-02-01 = 50.0
status:Production@2016-02-10 = 60.0
status:Production@2016-02-20 = 70.0
getPropertyValueByDate( id, 'status:Production@2016-02-15', 'xs:double' );
return => 60.0
getPropertyValueByDate( id, 'status:Production@', 'xs:double' );
return => 70.0
Since
1.9.0

◆ getPropertyValueList

QStringList domainBim::CoreAPI::getPropertyValueList ( QString  propName,
QString  propType,
int  maxValues 
)
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get available property values for visible objects.

Since
1.0.17, 27 jun 2012, jh
Remarks
Deprecated since 2.0.16, 17 Oct 2017
Deprecated:
Use AutomationAPI::getPropertyValues() instead.

◆ getPropertyValueRange

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).
A range is formatted as [<minValue>/<maxValue>], e.g. [-3,000/2,000].
The values of different domains are concatenated and separated by ';'.

Since
1.0.16
Remarks
modified 1.5.0, 30 mar 2016, sl

◆ getPropertyValuesByObject

QList<QVariant> domainBim::CoreAPI::getPropertyValuesByObject ( QString  objId,
QString  filterpattern = "*" 
)
slot

Get properties of an object.

Parameters
filterpatternGet only property values of types which name fits filterpattern. Default = '*' (all properties)
Returns
List of objects, see example below for structure

Example:

var idList = desiteAPI.strToIdList(desiteAPI.getSelected());
for( var i in idList ) {
console.log("ID: " + idList[i] );
var pl = desiteAPI.getPropertyValuesByObject( idList[i], '*BBox*' );
console.log( JSON.stringify(pl) );
}

Return:

[
{
"DisplayName": "cp:BBoxMaxX",
"Name": "cpBBoxMaxX",
"Type": "xs:double",
"Unit": "m",
"Value": 49.43439188232422,
"isInherited": false
},
{
"DisplayName": "cp:BBoxDX",
"Name": "cpBBoxDX",
"Type": "xs:double",
"Unit": "m",
"Value": 24.25000120239258,
"isInherited": false
},
]
Since
2.2.2, 13 sep 2018, jh
Remarks
2.4.8, 30 jan 2020, sl: fixed an error concerning inherited project repository properties

◆ getRangesOfRegion

QVariantList domainBim::CoreAPI::getRangesOfRegion ( QString  alignmentID,
QString  regionID 
)
slot

Get all ranges of a regions.

Parameters
alignmentIDID of the alignment object
regionIDID of the region
Returns
List of ranges, e.g. [[100.0,120.0],[160.5,180.2]]
See also
int addRangeToRegion( QString regionID, double fromStation, double toStation, QString alignmentID = QString() );
Since
2.2.1, 20 apr 2018, sl

◆ getRegionsOfAlignment

QStringList domainBim::CoreAPI::getRegionsOfAlignment ( QString  alignmentId)
slot

Get a list with regions (represented by their IDs) of an alignment with given ID.

Parameters
alignmentIdID of the alignment object
Returns
ID list of regions.
See also
QString addRegionToAlignment( QString alignmentId, QVariantMap setting );
Since
2.2.1, 20 apr 2018, sl

◆ getResourcesByObjectList

QStringList domainBim::CoreAPI::getResourcesByObjectList ( QString  idList)
slot
Returns
List of resources.
Since
1.5.0, 29 oct 2015, sl
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "res", "geometry" );

◆ getSectionsByObjectList

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

◆ getStationOfProjectedPoint

double domainBim::CoreAPI::getStationOfProjectedPoint ( QString  alignmentId,
double  x,
double  y,
double  z = 0.0 
)
slot

Get station (distance from start) of a given point related to the alignment.

Station start is not taken into account and must be added. See desiteAPI.getPropertyValue(alignmentId, "Alignment:StationStart", "xs:double");

Parameters
alignmentIdAlignment 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, -1 if the point cannot be projected onto the alignment or 'alignmentId' is no valid id.
Since
2.0.10, 07 mar 2017, sl

◆ getTaskMode

int domainBim::CoreAPI::getTaskMode ( QString  taskID)
slot
Return values
1manually scheduled
2automatically scheduled
-1unable to get task 'taskId'
-2unable to get task mode
Since
2.1.6, 15 mar 2018, jh

◆ getTaskRestrictionsByTask

QString domainBim::CoreAPI::getTaskRestrictionsByTask ( QString  taskID)
slot

Get task restrictions assigned to a task.

Parameters
taskIDID of task
Returns
ID of task restrictions (empty if task has no restrictions set)
Since
2.8.5, 14 Oct 2021

◆ getTasksByObjectList

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
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "activities", "geometry" );

◆ getTaskVisualisation

QString domainBim::CoreAPI::getTaskVisualisation ( QString  taskID)
slot

Get task visualisation configuration assigned to a task. Also inherited visualisations are checked. Note: If no visualisation is explicitly assigned to a task, the ID of the default visualisation (named "...") will be returned.

Parameters
taskIDID of task
Returns
ID of task visualisation (empty if task has no visualisation set)
Since
2.2.1, 04 Aug 2018, jh

◆ getTypesByObjectList

QStringList domainBim::CoreAPI::getTypesByObjectList ( QString  idList)
slot
Returns
List of types.
Since
1.5.0, 29 oct 2015, sl
Deprecated:
Use equivalent call:
getLinkedObjects ( idList, "type", "geometry" );

◆ getUserName

QString domainBim::CoreAPI::getUserName ( )
slot
Returns
The name of the user.
Since
1.0.17, 15 jun 2012, jh

◆ getValueOfAlignmentRegion

double domainBim::CoreAPI::getValueOfAlignmentRegion ( QString  alignmentID,
QString  regionID 
)
slot

Get the value assigned to a region.

Parameters
alignmentIDID of the alignment object
regionIDID of the region
Returns
value assigned to region.
See also
QString addRegionToAlignment( QString alignmentID, QVariantMap setting );
Since
2.2.1, 20 apr 2018, sl

◆ getVersion

QVariantMap domainBim::CoreAPI::getVersion ( )
slot

Get DESITE version information as an object.
Example:

{"major": 2,"minor": 2,"patch": 2,"build": 196}
Since
2.2.2, 31 Aug 2018, ah

◆ getVersionAsString

QString domainBim::CoreAPI::getVersionAsString ( )
slot

Get DESITE version information as a string, for example "2.2.1".

Since
2.0

◆ getVersionBUILD

int domainBim::CoreAPI::getVersionBUILD ( )
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get DESITE patch version number.

Remarks
Deprecated since 2.2.2, 31 Aug 2018
Deprecated:
Use getVersion() instead.
Reason: wrong name (returns patch number, not build number), convenience.

◆ getVersionMAJOR

int domainBim::CoreAPI::getVersionMAJOR ( )
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get DESITE major version number.

Remarks
Deprecated since 2.2.2, 31 Aug 2018
Deprecated:
Use getVersion() instead.
Reason: naming conventions, convenience.

◆ getVersionMINOR

int domainBim::CoreAPI::getVersionMINOR ( )
slot
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get DESITE minor version number.

Remarks
Deprecated since 2.2.2, 31 Aug 2018
Deprecated:
Use getVersion() instead.
Reason: naming conventions, convenience.

◆ idListToStr

QString domainBim::CoreAPI::idListToStr ( QStringList  idList)
slot

Build a semicolon-separated string from a list of IDs.

Since
2.2.1, 17 jun 2018, jh

◆ isLocked

bool domainBim::CoreAPI::isLocked ( QString  objId)
slot

Check if an object is locked.

Since
1.9.0, 13 may 2016, ar

◆ isPropertyInherited

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

◆ isSelected

bool domainBim::CoreAPI::isSelected ( QString  objId)
slot

Check if an object is selected.

Since
1.0.20, 24 nov 2012, jh

◆ isVisible

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

◆ isWired

bool domainBim::CoreAPI::isWired ( QString  objId)
slot

Check if an object is in wireframe mode.

Since
1.9.0, 13 may 2016, ar

◆ prepareJsCode

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

Prepare a formula, i.e. JavaScript code, by replacing variables.

Parameters
codeCode of formula
idID of object which provides property values.
decNumber of decimals, -1 = all decimals
frmtFormat to format numbers (see Qt)
Since
2.0.14, 12 jul 2017, jh

◆ removeRuleBasedLinks

int domainBim::CoreAPI::removeRuleBasedLinks ( QString  domainName)
slot

Remove rule based object links for a given domain.

Parameters
domainNameName of domain
Returns
1 ok
-1 error
Since
2.6.1, 25 aug 2020, sl

◆ requireVersion

bool domainBim::CoreAPI::requireVersion ( int  major,
int  minor,
int  patch 
)
slot

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

Since
2.0

◆ setProjectLongDescription

int domainBim::CoreAPI::setProjectLongDescription ( QString  s,
bool  overwriteExisting = false 
)
slot
Returns
1 if successful, else -1

◆ setProjectNumber

int domainBim::CoreAPI::setProjectNumber ( QString  s,
bool  overwriteExisting = false 
)
slot
Returns
1 if successful, else -1

◆ setProjectShortDescription

int domainBim::CoreAPI::setProjectShortDescription ( QString  s,
bool  overwriteExisting = false 
)
slot
Returns
1 if successful, else -1

◆ strToIdList

QStringList domainBim::CoreAPI::strToIdList ( QString  strIDList)
slot

Turn a string of semicolon-separated IDs into a list.

Since
2.2.1, 17 jun 2018, jh

◆ timeStamp

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 is 'ISO', then timestamp is formatted 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

◆ uncompressFromIfcGuid

QString domainBim::CoreAPI::uncompressFromIfcGuid ( QString  ifcGuid)
slot
Parameters
ifcGuId- ID in IFC format (base64 encoded, 22 characters)
Returns
ID in the format: 4F3E15A2-0000-2A06-3133-323934363838
Since
2.0.4, 11 oct 2016, jh

◆ updateRuleBasedLinks

int domainBim::CoreAPI::updateRuleBasedLinks ( QString  domainName,
bool  visibleOnly = false 
)
slot

Update rule based object links for a given domain.

Parameters
domainNameName of domain
visibleOnlyIf true, only objects links of visible domain items will be updated (default: false)
Returns
1 ok
-1 error
Since
2.6.1, 25 aug 2020, sl

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

Created: Tue Dec 13 2022 13:14:00