MainPage   Related pages 
Public Slots | List of all members
desiteCore::ProjectAPI Class Reference

#include <desiteCore/ProjectAPI.h>

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

Public Slots

void message (QString)
 
TOOLS
void startEXE (QString prg, QString args)
 
void showOnScreenKeyboard ()
 
void openLink (QString url, bool useDesktopService)
 
PROJECT
void openProject (QString url, bool useSessionData)
 
int saveProject ()
 
int saveCPA (QString cpa_filename, QString pack_bookmark)
 
Objects
void filterElements (QString pName, QString pType, QString pattern, bool checkInh=true, QString domainCombination="geometry")
 
Materials
int showColorSchema (QString name)
 
Visibility, Selection
void showAll (bool repaint, QString domainCombination="geometry")
 
void hideAll (bool repaint, QString domainCombination="geometry")
 
void showElements (QString idList, bool includeBlocked=false, QString domainCombination="geometry")
 
void showElementsOnly (QString IDList, QString domainCombination="geometry")
 
void hideElements (QString idList, bool ignoreObjectLocking=false, QString domainCombination="geometry")
 
void clearSelection (bool repaint, QString domainCombination="geometry")
 
void selectVisible ()
 
void selectVisibleGeometric ()
 
void selectElements (QString idList, bool flag, QString domainCombination="geometry")
 
void zoomToSelected ()
 
void zoomToVisible ()
 
void zoomToObjects (QString objIDList)
 
void zoomToAllDocuments ()
 
void zoomToSelectedDocuments ()
 
void zoomToVisibleDocuments ()
 
void zoomToDocuments (QStringList idList)
 
void zoomToAllResources ()
 
void zoomToSelectedResources ()
 
void zoomToVisibleResources ()
 
void zoomToResources (QStringList idList)
 
void zoomToLocationGK (double rw, double hw, double h)
 
void zoomTopView ()
 
QString getVisible (QString domainFilter="geometry")
 
bool hasVisible (QString domainFilter="all")
 
int countVisible (QString domainFilter="geometry")
 
QString getSelected (QString domainFilter="geometry")
 
bool hasSelected (QString domainFilter="all")
 
int countSelected (QString domainFilter="geometry")
 
void setVisualisationMode (int mode, bool repaint=true)
 
int getVisualisationMode ()
 
QVariantMap showElementsOOBBSide (QString IDList, double prec)
 
QVariantMap showElementsOOBBTop (QString idList, double prec)
 
QVariantMap showElementsOOBBFront (QString idList, double prec)
 
void showDimensionsPainter (bool showAABB, bool showOOBB)
 
void hideDimensionsPainter ()
 
void repaint3DView ()
 
Viewpoints, Clipping, Camera, Light Sources
int showViewpoint (QString name)
 
int showViewpointByID (QString id)
 
QVariantMap getViewpointList ()
 
QVariantMap getViewpointMetadata (QString id)
 
void addToViewPoint (QString vpID, QString objIdList)
 
void removeFromViewPoint (QString vpID, QString objIdList)
 
QString saveViewpoint (QString name, bool saveVisible=true, bool saveSelected=false)
 
QString getCurrentViewAsImage ()
 
bool saveCurrentViewToFile (QString filename)
 
QVariantMap getClipping (int i)
 
void setClipping (int i, QVariantMap clp)
 
QVariantMap getCamera ()
 
void setCamera (QVariantMap cam)
 
QList< QVariant > getLightSources ()
 
void setLightSources (QList< QVariant > lList)
 
QVariantMap getVisualizationOptions ()
 
void setVisualizationOptions (QVariantMap opt)
 
QVariantMap getPainterOptions ()
 
void setPainterOptions (QVariantMap opt)
 
TOOLTIPS
int activateObjTooltip (QString name)
 
void deactivateObjTooltip ()
 
QString getActiveTooltipName () const
 
void setDocumentsTooltipsVisible (bool v)
 
bool getDocumentsTooltipsVisible ()
 
4D SIMULATION
void set4dIsActive (bool active)
 
bool get4dIsActive ()
 
bool set4dDateTime (QDateTime dt)
 
QDateTime get4dDateTime ()
 
QVariantMap get4dOptions ()
 
void set4dOptions (QVariantMap opt)
 
QDateTime get4dProjectStart ()
 
QDateTime get4dProjectFinish ()
 
QStringList get4dActiveTaskList (QDateTime dt, bool linkedToObjectsOnly=false)
 
QStringList get4dActiveTaskListByInterval (QDateTime dtStart, QDateTime dtEnd, bool linkedToObjectsOnly=false)
 
QStringList get4dFinishedTaskList (QDateTime, bool linkedToObjectsOnly=false)
 
QStringList get4dProspectiveTaskList (QDateTime, bool linkedToObjectsOnly=false)
 
QString get4dTaskColor (QString taskID, QDateTime dt, QString defaultColorName="#000")
 
BUILDING STRUCTURE
void setBsPlanUnderlayActive (bool)
 
bool getBsPlanUnderlayActive ()
 
Navigation Modes
QString getNavigationMode ()
 
void setNavigationMode (QString mode, QString pinModeContainerID=QString())
 
QVariantMap getHandlerMode ()
 
bool setHandlerMode (QVariantMap handlerInfo)
 
QStringList getCreatedPins ()
 
PICK POINTS, MEASURE
QVariantMap getPickedPoint ()
 
QVariantMap getAllPickedPoints ()
 
QVariantMap getPickedPointGPS ()
 
QVariantMap getPickedPointGK ()
 
void clearMeasureItems ()
 
CLASH DETECTION
void showClashList (QString clashIdList)
 
- Public Slots inherited from domainBim::AutomationAPI
bool hasElement (QString ID)
 
QStringList getRootContainerList (QString modelName)
 
QString findContainerByName (QString parentID, QString name, QString lookupDomain="all")
 
QString getContainerByName (QString parentID, QString name)
 
bool isContainer (QString ID)
 
QVariantList findDocumentsByLocationGps (double lat, double lon, double distance, QStringList idList=QStringList())
 
QVariantList findDocumentsByLocationRangeGps (QStringList gpsCoordinates, double distance, QStringList idList=QStringList())
 
QVariantList findDocumentsByLocationGk (double rw, double hw, double distance, QStringList idList=QStringList())
 
QStringList findDocumentsByDate (QDateTime start, QDateTime end, QStringList idList=QStringList(), bool useRef=false)
 
int synchronizeDocumentContainer (QString containerID)
 
void resetDocumentMetaData (QString objID)
 
QVariantMap getVisualisationList ()
 
int setVisualisationByID (QString taskIDList, QString visID)
 
int removeVisualisation (QString taskIDList)
 
int hasContact (QString objID1, QString objID2, QVariantMap options=QVariantMap())
 
QString createContactObject (QString parentID, QString objID1, QString objID2, QString matID, QVariantMap options=QVariantMap())
 
QStringList cutObject (QString parentID, QString objID, QVariantMap plane=QVariantMap())
 
QString mergeObjects (QString parentID, QString IDs, bool skipClosed=false, bool keepTransparency=false)
 
bool isIncludedIn (QString objID1, QString objID2)
 
int isPointIncludedIn (double x, double y, double z, QString objID, double tol=1.e-5)
 
int checkIntersection (QString objID1, QString objID2, double tolerance=-0.00001)
 
int transformObject (QString objID, QString transformation)
 
int setAsOpening (QString objID, QString openingIDList)
 
QString getProjectionAsSvg (QString idList, QVariantMap options=QVariantMap())
 
QString getDomainByElement (QString id)
 
QString getModelByName (QString name, QString domainFilter="geometry")
 
QString getModelByElement (QString eleID, QString domainFilter="all")
 
QString getRootContainerByName (QString modelName, QString rootContainerName)
 
QStringList getModelListByName (QString name, QString domain="geometry")
 
QStringList getModelListByDomain (QString domainFilter="all")
 
QString getRootNodeByModel (QString modelID)
 
QStringList getRootNodeListByDomain (QString domainFilter="all")
 
QString createModel (QString name, bool createRootC=true, QString domain="geometry")
 
QVariantMap getModelMetaData (QString modelID)
 
int deleteModel (QString id)
 
int setLinkedObjects (QString eleID, QString IDList)
 
int removeAllLinkedObjects (QString objID)
 
int removeLinkedObjects (QString objID, QString IDList)
 
int setPropertyValue (QString objID, QString propName, QString propDataType, QVariant value)
 
int deleteProperty (QString objID, QString propName, QString propDatatype)
 
int createPropertyType (QString propName, QString propDatatype, QString uomCode, bool isInh, int target, QString domainName="all")
 
int setPropertyTypeMetaData (QString pName, QString ptype, QVariantMap metadata)
 
int deletePropertyType (QString propName, QString propDatatype, QString domainName="all")
 
QList< QVariant > getAvailablePropertyValues (QString propName, QString propDatatype, int maxValues, QString domainName="geometry")
 
QList< QVariant > getPropertyValues (QString propName, QString propDatatype, int maxValues=0, QString domainName="all")
 
QList< QVariant > getPropertyValuesByObjectList (QString propName, QString propDatatype, bool checkInh, QString objIdList, int maxValues=0, QString domainName="all")
 
QString createMaterial (QString matXml, QString modelID=QString())
 
int deleteMaterial (QString matID)
 
QStringList getMaterialList ()
 
QString getMaterialAsXmlByID (QString matID)
 
QString getMaterialIDByName (QString matName)
 
void updateMaterial (QString matID, QString xmlMat)
 
int setMaterialToObjects (QString matID, QString objectIDList)
 
int setTransparency (QString objectIDList, float defaultTransparency=0.95)
 
void resetMaterials (bool updateUI=true)
 
QString createColorSchema (QString setContainerID, QString name)
 
QString createColorSchemaFromCurrentMaterials (QString name, bool updateExisting, QVariantMap options=QVariantMap())
 
QStringList getColorSchemaList ()
 
QString getCurrentColorSchema ()
 
bool activateColorSchemaByName (QString name)
 
void reorderElements ()
 
void showWireModeSchema (QString name)
 
void clearWireMode ()
 
void setObjectsToWireMode (QString idList, bool wired)
 
QString createWireModeSchema (QString idList, QString wmName, bool overwrite=false)
 
QString getWired ()
 
int countWired ()
 
double getBBoxMinX ()
 
double getBBoxMaxX ()
 
double getBBoxMinY ()
 
double getBBoxMaxY ()
 
double getBBoxMinZ ()
 
double getBBoxMaxZ ()
 
void updateBoundingBox3DView ()
 
int calcOOBB (QString objIDList, double eps=0.01)
 
int updateOOBB (QString obIDList, double eps=0.01)
 
int calcOOBBxy (QString objIDList, double eps=0.01)
 
int updateOOBBxy (QString objIDList, double eps=0.01)
 
QVariantMap getBoundingBoxCommon (QString objIDList)
 
QVariantMap getOOBBCommon (QString objIDList)
 
QVariantMap getOOBBxyCommon (QString objIDList)
 
double checkOverlapOBB (QString id1, QString id2, double eps)
 
QString createObjectFromXml (QString parentID, QString objectXML)
 
int deleteObjects (QString IDList)
 
void setName (QString objIdList, QString name)
 
QString createObject (QString parentID, QString name)
 
QString createSelectionSets (QString propName, QString rootName, QVariantMap config=QVariantMap())
 
QVariantMap getAsJSON (QString objID)
 
int createDirectory (QString path, QString dirName)
 
bool writeFile (QString filename, QString content, QString codec=QString())
 
bool appendToFile (QString filename, QString content, QString codec=QString())
 
bool removeFile (QString filename)
 
bool checkIfFileExists (QString filename)
 
bool openFile (QString filename, QString codec=QString())
 
bool writeToFile (QString content)
 
bool closeFile ()
 
QStringList readTextFile (QString filename, bool ignoreLineBreakesInDoubleQuotes=false, QString codec=QString())
 
QString readTextFileAsString (QString filename, QString codec=QString())
 
QVariantMap readCsvFile (QString filename, QString delimiter=";", QString quoteSign="\"")
 
QString readImageFile (QString filename, QString targetFormat="")
 
QVariantList getDirectoryEntryList (QString dirPath, bool filesOnly=false, QString orderBy="Name")
 
bool dbIsLocalCopy ()
 
void dbCheckIn ()
 
void dbCheckOut (QStringList propList)
 
bool dbQueryExec (QString sqlQuery)
 
bool dbQueryNext ()
 
QVariant dbQueryValue (int column)
 
int setPropertyValueDB (QString objIDList, QString propName, QString propDataType, QString propDomain, QVariant value, bool createType=true)
 
int writePropertyValueDB (QString objIDList, QString propName, QString propDataType, QString propDomain, QVariant value, bool createType=true)
 
bool startTransaction ()
 
bool endTransaction ()
 
bool dbGetImmediateUpdate ()
 
void dbSetImmediateUpdate (bool)
 
int dbClearCache (QString propName, QString propType)
 
void dbClearCacheAll ()
 
int dbDeleteProperty (QString objIDList, QString propName, QString propType)
 
int dbAssertTable (QString tableName, QStringList columnsList)
 
QStringList getListOfObjTooltips ()
 
void addObjectListToTooltip (QString idList, QString tooltipname)
 
void removeObjectListFromTooltip (QString idList, QString tooltipname)
 
void lockObjects (QString idList)
 
void unlockObjects (QString idList)
 
void unlockAllObjects ()
 
QString getLocked ()
 
int countLocked ()
 
void itClear ()
 
int itByFilter (QString propName, QString propDatatype, QString filterPattern, bool checkInh=true, QString domain="geometry")
 
int itFilterByStatus (QString status, bool enabled=true, QString domain="all")
 
int itByObjectList (QString idList)
 
QString itGetObjectList ()
 
bool itHasNext ()
 
QString itNext ()
 
int itCount ()
 
void itToFront ()
 
QList< QVariant > itGetAvailablePropertyValues (QString propName, QString propDatatype, int maxValues)
 
void itSetupDbCache (QString propName, QString propType)
 
void itSetMaterial (QString matID)
 
void itColorCode (QString propName, QString propDT)
 
void itColorCodeNumber (QString propName, QString propDT, double intervalSize)
 
void itCalcOOBB (double eps)
 
void itUpdateOOBB (double eps)
 
void itCalcOOBBxy (double eps)
 
void itUpdateOOBBxy (double eps)
 
- Public Slots inherited from domainBim::CoreAPI
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)
 
QString getApplicationDirectory ()
 
QString getApplicationFilename ()
 
QString getApplicationLanguage ()
 
QString getVersionAsString ()
 
int getVersionMAJOR ()
 
int getVersionMINOR ()
 
int getVersionBUILD ()
 
bool requireVersion (int MAJOR, int MINOR, int BUILD)
 
QString getUserName ()
 
QString getProjectID ()
 
int getProjectVariantNumber ()
 
QString getProjectNumber ()
 
QString getProjectName ()
 
QString getProjectShortDescription ()
 
QString getProjectLongDescription ()
 
QString getProjectDirectory ()
 
QString getLocation ()
 
QString getDomainByElement (QString objID)
 
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())
 
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)
 
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)
 
bool isVisible (QString objID)
 
bool isSelected (QString objID)
 
bool isLocked (QString objID)
 
bool isWired (QString objID)
 
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
 ProjectAPI (NavigatorProject *np, QObject *parent=0)
 
virtual ~ProjectAPI ()
 
- Public Member Functions inherited from domainBim::AutomationAPI
 AutomationAPI (BimProject *bimPrj, bool isAutomation, QObject *parent=0)
 
virtual ~AutomationAPI ()
 
- Public Member Functions inherited from domainBim::CoreAPI
 CoreAPI::CoreAPI (BimProject *bimPrj, QObject *parent=0)
 
virtual ~CoreAPI ()
 
BimProject * getBimProject ()
 

Additional Inherited Members

- Protected Member Functions inherited from domainBim::CoreAPI
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

DESITE API for scripting.

Object on JavaScript stack: desiteAPI

Since
1.0.17, 15 jun 2012 by jh
Id
ProjectAPI.h 361 2017-09-04 15:39:15Z ansgar.horstmann

(c) ceapoint aec technologies GmbH

Member Function Documentation

int desiteCore::ProjectAPI::activateObjTooltip ( QString  name)
slot
Returns
Index of activated Object-Tooltip.
Since
1.3.2, 28 mar 2014, jh
void desiteCore::ProjectAPI::addToViewPoint ( QString  vpID,
QString  objIdList 
)
slot

Add a list of objects to an existing Viewpoint's visible objects

Since
2.0.16, 2017-09-04, ah (port from 1.4)
void desiteCore::ProjectAPI::clearMeasureItems ( )
slot

Removes all measurements which where set by the measure handler.

Since
1.9.0, aug 2016, mm
void desiteCore::ProjectAPI::clearSelection ( bool  repaint,
QString  domainCombination = "geometry" 
)
slot

Unselect all objects.

Parameters
repainttrue: Refresh 3D-view after selection is cleared.
Since
1.0.16
int desiteCore::ProjectAPI::countSelected ( QString  domainFilter = "geometry")
slot

Get number of selected elements.

Parameters
domainFilterCount only visible of given domains
Since
1.0.16
int desiteCore::ProjectAPI::countVisible ( QString  domainFilter = "geometry")
slot

Get number of visible elements.

Parameters
domainFilterCount only visible of given domains
Since
1.0.16
void desiteCore::ProjectAPI::deactivateObjTooltip ( )
slot
Since
1.3.2, 28 mar 2014, jh
void desiteCore::ProjectAPI::filterElements ( QString  pName,
QString  pType,
QString  pattern,
bool  checkInh = true,
QString  domainCombination = "geometry" 
)
slot

Filter elements and show matching objects only.

Since
1.0.16
QStringList desiteCore::ProjectAPI::get4dActiveTaskList ( QDateTime  dt,
bool  linkedToObjectsOnly = false 
)
slot

Get list of tasks active on date 'dt';

QStringList desiteCore::ProjectAPI::get4dActiveTaskListByInterval ( QDateTime  dtStart,
QDateTime  dtEnd,
bool  linkedToObjectsOnly = false 
)
slot

Get list of tasks which are active between dtStart and dtEnd.

Since
01 dec 2015, jh
QDateTime desiteCore::ProjectAPI::get4dDateTime ( )
slot

Get current date/time of simulation.

Since
1.5.0, 14 oct 2015, jh
QStringList desiteCore::ProjectAPI::get4dFinishedTaskList ( QDateTime  ,
bool  linkedToObjectsOnly = false 
)
slot

Get list of tasks finished on date 'dt';

bool desiteCore::ProjectAPI::get4dIsActive ( )
slot

Check if 4d simulation is activated.

Since
1.5.0, 14 oct 2015, jh
QVariantMap desiteCore::ProjectAPI::get4dOptions ( )
slot

Get 4D options as JSON object.

{
"animationName":"A1",
"drawLegend":true,
"drawTasks":true,
"legendMaxRows":50,
"showAnimation":true,
"showOnlyTasksWithLinkedObjects":false,
"simulateVisibleTasks":false,
"simulationStep":1,
"startFinishWithTime":false
}
Since
1.5.0, 14 oct 2015, jh
QDateTime desiteCore::ProjectAPI::get4dProjectStart ( )
slot

Get project start, i.e. first start date.

QStringList desiteCore::ProjectAPI::get4dProspectiveTaskList ( QDateTime  ,
bool  linkedToObjectsOnly = false 
)
slot

Get list of tasks which have not been started on date 'dt';

QString desiteCore::ProjectAPI::get4dTaskColor ( QString  taskID,
QDateTime  dt,
QString  defaultColorName = "#000" 
)
slot

Get color of task 'taskID' at datetime dt.

Since
1.5.0, 14 oct 2015, jh
QString desiteCore::ProjectAPI::getActiveTooltipName ( ) const
slot
Returns
Name of active object tooltip. Empty string if no tooltip is active.
Since
1.3.6, 26 apr 2014, jh
QVariantMap desiteCore::ProjectAPI::getAllPickedPoints ( )
slot

Get all picked points from measure handler (if active) as a list "points". Points are listed in pick order. Measured lines, polygones etc. are ignored. Each measure point is represented by an object in the list having 2 attributes: Attribute ip contains the internal model coordinates, attribute p the global coordinates. the list can be translated into JSON-String.

Example: JSON.stringify( desiteAPI.getAllPickedPoints(), undefined, 2 ); returns:

{
"points":[
{
"ip":[-9.793106549424811,-9.601763445601856,16.2],
"p":[-9.793106549424811,-9.601763445601856,16.2]
},
{
"ip":[-9.79410654942481,5.1549005393821545,15.4],
"p":[-9.79410654942481,5.1549005393821545,15.4]
}
]
}
Since
2.0.7, 20 dec 2016, ar
QVariantMap desiteCore::ProjectAPI::getCamera ( )
slot

projection: 0 = perspective, 1 = ortho

{
projection: 0,
eye: [12.2,23.4,34.5],
poi: [12.2,23.4,34.5],
near: 1.23,
far: 1.23,
aspectRatio: 1.23,
orthoHeight: 1.23
}
Since
1.3.5, 20 apr 2014, jh
QVariantMap desiteCore::ProjectAPI::getClipping ( int  i)
slot

Get clipping parameters as JSON object.

JSON object:

{
enabled: true,
d: 12.23,
nx: 1.0,
ny: 0.0,
nz: 0.0
}

Example.

for( var i=0; i<6; i++ ) {
var clp = desiteAPI.getClipping(i);
console.append( clp.enabled );
console.append( clp.d );
console.append( clp.nx + '/' + clp.ny + '/' + clp.nz );
}
Since
1.3.5, 19 apr 2014, jh
QStringList desiteCore::ProjectAPI::getCreatedPins ( )
slot

Get ids of all pins created since navigation mode was set to 'pin'.

Since
1.4.10, may 2015, jh
QString desiteCore::ProjectAPI::getCurrentViewAsImage ( )
slot

Get the current view as Base64 encoded image.

Example:

<html>
<head>
<script>
function showView()
{
// console.log('show view');
var s = desiteAPI.getCurrentViewAsImage();
imgA.src = 'data:image/png;base64,' + s;
}
</script>
</head>
<body>
<input type="submit" onclick="showView()" value="Show View" /> <br>
<image width="200" id="imgA" />
</body>
</html>
Since
1.3.4, 12 apr 2014, jh
QVariantMap desiteCore::ProjectAPI::getHandlerMode ( )
slot

Return current handler (navigation) mode with additional info as json object.

See also
setHandlerMode( QVariantMap )
Since
1.9.0. 01 jul 2017, sl
QList<QVariant> desiteCore::ProjectAPI::getLightSources ( )
slot

Get light sources as list of JSON objects.

[
{
"ambient": {"b":0.29411765933036804,"g":0.29411765933036804,"r":0.29411765933036804},
"diffuse": {"b":0.4901960790157318,"g":0.4901960790157318,"r":0.4901960790157318},
"specular":{"b":0.1568627506494522,"g":0.1568627506494522,"r":0.1568627506494522},
"direction": [0,0,0],
"enabled":true,
"followsCamera":true,
"glID":16384,
"position":[2.7,-5,5.2]
},
...
]
Since
2.1.0, 29 may 2017, jh
QString desiteCore::ProjectAPI::getNavigationMode ( )
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Get current navigation mode.

See also
setNavigationMode()
Since
1.0.16
Deprecated:
Use getHandlerMode() instead!
QVariantMap desiteCore::ProjectAPI::getPainterOptions ( )
slot

Get Painter Options.

Returns an Object with the following Properties:

Property | Type -------------------------—+--------------------— drawSolid | bool drawWired | bool edgesColor | list(3) of float (RGB) edgesWidth | int drawNegative | bool drawComposites | bool drawParts | bool alignmentsWidth | int drawOOBB | bool drawOOBBxy | bool drawTesselation | bool drawNormalVectors | bool scaleFactorNormals | double backfaceCulling | bool selectionColor | list(3) of float (RGB) selectCompositeParts | bool selectAllCompositeParts | bool selectVisibleCompPartsOnly | bool

Example:

var pOpt = desiteAPI.getPainterOptions();
if (pOpt.drawWired) {
alert( 'Edges are drawn in color ' + pOpt.edgesColor[0] + ',' + pOpt.edgesColor[1] + ',' + pOpt.edgesColor[2] );
}
Since
1.3.8, 06 may 2014, ah
QVariantMap desiteCore::ProjectAPI::getPickedPoint ( )
slot

Get last picked point from measure handler (if active) as JSON object. Attribute ip contains the internal model coordinates, attribute p the global coordinates.

Example: JSON.stringify( desiteAPI.getAllPickedPoints(), undefined, 2 ); returns:

{
"ip":[-9.793106549424811,-9.601763445601856,16.2],
"p":[-9.793106549424811,-9.601763445601856,16.2]
}
Since
1.9.0, 08 mar 2016, jh
QString desiteCore::ProjectAPI::getSelected ( QString  domainFilter = "geometry")
slot

Get selected elements.

Parameters
domainFilterGet only visible of given domains
Returns
List of selected element IDs separated by ';'
Since
1.0.16
QVariantMap desiteCore::ProjectAPI::getViewpointList ( )
slot

Get list of viewpoints.
The viewpoints are encoded in a JSON object which contains the ID and the name.

Example:

var vpListJSON = desiteAPI.getViewpointList();
var vpList = vpListJSON.list;
for( var i=0; i<vpList.length; i++ ) {
var vpID = vpList[i].ID;
var vpName = vpList[i].name;
var vpAnno = vpList[i].annotation;
console.log("ID: " + vpID + ", name: " + vpName, annotation: " + vpAnno );
}
Since
20 aug 2016, jh 01 sep 2017, ar
QVariantMap desiteCore::ProjectAPI::getViewpointMetadata ( QString  id)
slot
Parameters
idViewpoint ID
Since
2.0.13, 26 may 2017, jh
QString desiteCore::ProjectAPI::getVisible ( QString  domainFilter = "geometry")
slot

Get visible elements.

Parameters
domainFilterGet only visible of given domains
Returns
List of element IDs separated by ';'
Since
1.0.16
int desiteCore::ProjectAPI::getVisualisationMode ( )
slot
Since
1.5.0, 21 jul 2015, jh
QVariantMap desiteCore::ProjectAPI::getVisualizationOptions ( )
slot

Get Visualization Options.

Returns an Object with the following Properties:

Property Type
drawOrigin bool
drawGrid bool
gridDistanceFine double
gridDistanceBold double
drawBoundingBox bool
showFramerate bool
enableFastPaint bool
lineStepFastPaint int
walkSpeed double
decimalPlaces int
bgColor list(3) of float (RGB)
lineStep int
drawNorthArrow bool
northArrowPos list(3) of float (xyz)
northArrowRot double
modelCoordinates list(2) of double (xy)
gpsLat double
gpsLon double

Example:

var visOpt = desiteAPI.getVisualizationOptions();
if (visOpt.drawNorthArrow) {
alert( 'North arrow at coordinates ' + visOpt.northArrowPos[0] + ',' + visOpt.northArrowPos[1] + ',' + visOpt.northArrowPos[2] );
}
Since
1.3.5, 22 apr 2014, ah
bool desiteCore::ProjectAPI::hasSelected ( QString  domainFilter = "all")
slot

Check if the domain projects have selected elements.

Parameters
domainFilterCheck only given domains. Default is 'all' domains.
Since
1.5.0
bool desiteCore::ProjectAPI::hasVisible ( QString  domainFilter = "all")
slot

Check if the domain projects have visible elements.

Parameters
domainFilterCheck only given domains. Default is 'all' domains.
Since
1.5.0
void desiteCore::ProjectAPI::hideAll ( bool  repaint,
QString  domainCombination = "geometry" 
)
slot

Blocked objects are not included.

Since
1.0.16
void desiteCore::ProjectAPI::hideElements ( QString  idList,
bool  ignoreObjectLocking = false,
QString  domainCombination = "geometry" 
)
slot
Parameters
ignoreObjectLockingHide also objects if they are blocked [optional]
Since
1.0.16
Remarks
1.3.8 Added optional parameter 'ignoreObjectLocking', jh
void desiteCore::ProjectAPI::message ( QString  )
slot

Send a message to the remote interface of the desite application. This is the same interface as it can be used with a TCP-socket. The interface is documented in the tutorial 'desite_remote.pdf'.

This is functionality is available in desite MD only!

Example:
show a message in a message window:

desiteAPI.message( "<cmdMessage><![CDATA[<font size=\"+2\" color=\"#ffffff\">Nur eine Tür selektieren!</font>]]></cmdMessage>");
Since
1.0.18, 15 aug 2012, jh
void desiteCore::ProjectAPI::openLink ( QString  url,
bool  useDesktopService 
)
slot

Open an URL by passing this url to the operating system or to the project.

Parameters
useDesktopServicetrue: The URL is passed directly to the operating system
false: The project handles the link, this enables paths relative to the project directory
// Open webpage in standard browser.
desiteAPI.openLink( 'http://www.ceapoint.com', true );
Since
1.3.1, 27 feb 2014, jh
void desiteCore::ProjectAPI::openProject ( QString  url,
bool  useSessionData 
)
slot

Open project in this instance.

Parameters
useSessionDataOpen project with last session settings such as last viewpoint.
Since
1.3.3, 02 apr 2014, jh
void desiteCore::ProjectAPI::removeFromViewPoint ( QString  vpID,
QString  objIdList 
)
slot

Remove a list of objects from a Viewpoint's visible objects

Since
2.0.16, 2017-09-04, ah (port from 1.4)
void desiteCore::ProjectAPI::repaint3DView ( )
slot

Refresh 3D-view.

Since
1.0.16
int desiteCore::ProjectAPI::saveCPA ( QString  cpa_filename,
QString  pack_bookmark 
)
slot

Write CP Archive to 'cpa_filename'.

Returns
Error Code:
1 - OK
-1 - Erroro
Since
2.1.0, 31 may 2017, jh
bool desiteCore::ProjectAPI::saveCurrentViewToFile ( QString  filename)
slot

Save the current view to a file. The format is specified by the extension of the filename.

Supported formats are *.jpg, *.png

Example:

var s = desiteAPI.saveCurrentViewToFile( 'C:/tmp/abc.jpg' );
// if s = false, picture could not be saved
Since
12 aug 2016, 2016, jh
int desiteCore::ProjectAPI::saveProject ( )
slot

Save current project. return 1 ok 0 undefined -1 could not save

QString desiteCore::ProjectAPI::saveViewpoint ( QString  name,
bool  saveVisible = true,
bool  saveSelected = false 
)
slot

Create a viewpoint from current view.

Parameters
saveVisible: Store the visible objects to new viewpoint
saveSelected: Store the selected objects to new viewpoint
Returns
ID of new viewpoint.
Since
1.3.5, 18 apr 2014, jh
void desiteCore::ProjectAPI::selectElements ( QString  idList,
bool  flag,
QString  domainCombination = "geometry" 
)
slot

Select objects.

After selection the 3D-view is not repainted. To refresh the 3D-view call repaint3DView():

Parameters
idListList of Object IDs separated by ';'.
flagtrue = select, false = unselect elements
Since
1.0.16
void desiteCore::ProjectAPI::selectVisible ( )
slot
Since
1.0.16
void desiteCore::ProjectAPI::selectVisibleGeometric ( )
slot
Since
1.0.17, 01 jul 2012, jh
bool desiteCore::ProjectAPI::set4dDateTime ( QDateTime  dt)
slot

Set current date/time of 4D-Simulation.

Returns
true if date could be set and model is painted, false if a date is just being set.
Since
1.5.0, 14 oct 2015, jh
void desiteCore::ProjectAPI::set4dIsActive ( bool  active)
slot

Activate/Deactivate 4D-Simulation.

Since
1.5.0, 14 oct 2015, jh
void desiteCore::ProjectAPI::set4dOptions ( QVariantMap  opt)
slot

Set 4D options as JSON object.

See also
get4dOptions()
Since
1.5.0, 14 oct 2015, jh
void desiteCore::ProjectAPI::setBsPlanUnderlayActive ( bool  )
slot

Draw plan underlay of building structure.

void desiteCore::ProjectAPI::setCamera ( QVariantMap  cam)
slot

Set camera.

Parameters
cam: Camera encoded as JSON
var cam = {
near: 0.5,
far: 25000,
eye: [ 0.0, 1.0, 2.0 ],
poi: [ 10.0, 8.0, 3.0 ],
projection: 0
}
desiteAPI.setCamera( cam );
Since
1.3.5, 20 apr 2014, jh
void desiteCore::ProjectAPI::setClipping ( int  i,
QVariantMap  clp 
)
slot
Parameters
i: Index of clipping plane [0,5]
var clp = { enabled: true, d: 12.0, nx: 1.0, ny: 0.0, nz: 0.0 }
desiteAPI.setClipping( 0, clp );
Since
1.3.5, 19 apr 2014, jh
bool desiteCore::ProjectAPI::setHandlerMode ( QVariantMap  handlerInfo)
slot

Set handler for navigation mode.

Parameters
handlerInfoJSON object containing type of handler which is one of the following:
'select', 'orbit', 'pan', 'walk', 'lookaround', 'zoom', 'measure', 'cut', 'pin', 'redline'
Returns
true, if handler could be set, else false

Examples:

Select Handler

var handlerInfo = {
type: 'select'
}

Orbit Handler

var handlerInfo = {
type: 'orbit'
}

Measure Handler

var handlerInfo = {
type: 'measure',
mode: 'points' // one of 'points', 'lines', 'polylines', 'polygons', 'faces'
}

Cutting Handler

var handlerInfo = {
type: 'cut',
mode: 'perpendicular' // one of 'horizontal', 'vertical', 'perpendicular'
snap: 'point' // one of 'point', 'line'
}

Pin Handler

var handlerInfo = {
type: 'pin',
containerID: 'xyz123' // parent container id of pins
}

Redlining Handler

var handlerInfo = {
type: 'redline',
mode: 'rect', // one of 'rect', 'oval', 'text', 'freehand', 'erase'
penWidth: 5, // should be 1, 5 or 10
penColor: 'red', // one of 'red', 'green', 'blue' or hex-coded color value
brushColor: '#FFFF00', // one of 'red', 'green', 'blue' or hex-coded color value
}
Since
1.9.0. 01 jul 2017, sl
void desiteCore::ProjectAPI::setLightSources ( QList< QVariant >  lList)
slot
Since
2.1.0, 29 may 2017, jh
void desiteCore::ProjectAPI::setNavigationMode ( QString  mode,
QString  pinModeContainerID = QString() 
)
slot
Deprecated:
This method will be removed in future versions of DESITE MD and should not be used for new scripts anymore.

Modes: 'pin', 'select', 'orbit', 'pan', 'lookaround', 'zoom', ...

Parameters
pinModeContainerIDIF pinMode this is the parentcontainer where the pins are created.
Since
1.0.16; deprecated 1.9.0, 01 jul 2016
Deprecated:
Use setHandlerMode( QVariantMap mode ) instead!
void desiteCore::ProjectAPI::setPainterOptions ( QVariantMap  opt)
slot

Set Painter Options

Parameters
opt: Options encoded as a JSON object

See getPainterOptions() for a list of all properties; not all must be set!

Example:

desiteAPI.setPainterOptions({ drawWired: true, edgesColor: [1.0, 0.0, 0.0] });
Since
1.3.8, 06 may 2014, ah
void desiteCore::ProjectAPI::setVisualisationMode ( int  mode,
bool  repaint = true 
)
slot

0 - Normal
1 - Wire Mode, Selected in Model Color, Unselected as Lines in Model Color
2 - Wire Mode, Selected in Model Color, Unselected as Lines in grey

Since
1.0.16
void desiteCore::ProjectAPI::setVisualizationOptions ( QVariantMap  opt)
slot

Set Visualization Options

Parameters
opt: Options encoded as a JSON object

See getVisualizationOptions() for a list of all properties; not all must be set!

Example:

desiteAPI.setVisualizationOptions({ drawNorthArrow: true, northArrowPos: [5.0, 5.0, 0.0] });
Since
1.3.5, 22 apr 2014, ah
void desiteCore::ProjectAPI::showAll ( bool  repaint,
QString  domainCombination = "geometry" 
)
slot
Since
1.0.16
void desiteCore::ProjectAPI::showClashList ( QString  clashIdList)
slot

Show conflicted objects of given clashes.

Since
1.9.0, 04 aug 2016, jh
int desiteCore::ProjectAPI::showColorSchema ( QString  name)
slot

Show Color Schema by name.

Returns
1 Ok
-1 Color Schema does not exist
Since
1.0.16
void desiteCore::ProjectAPI::showElements ( QString  idList,
bool  includeBlocked = false,
QString  domainCombination = "geometry" 
)
slot
Parameters
includeBlockedShow also objects if they are blocked [optional]
Since
1.0.16
Remarks
1.3.8 Added optional parameter 'includeBlocked', jh
void desiteCore::ProjectAPI::showElementsOnly ( QString  IDList,
QString  domainCombination = "geometry" 
)
slot

Hide all objects and show objects in list 'IDList' only.

Since
1.3.5, 19 apr 2014, jh
QVariantMap desiteCore::ProjectAPI::showElementsOOBBSide ( QString  IDList,
double  prec 
)
slot
Returns
Size of resulting Opt OBB
{
Height: 2.45,
Width: 1.23,
Length: 4.56
}
Since
1.4.8, 29 sep 2014, jh
void desiteCore::ProjectAPI::showOnScreenKeyboard ( )
slot

Open virtual keyboard.

Since
1.9.0, 27 may 2016, jh
Remarks
update 2.0.9, 16. jan 2017, ar, for Windows10
int desiteCore::ProjectAPI::showViewpoint ( QString  name)
slot

Show a viewpoint by name.

Returns
1 : ok
-1 : viewpoint 'name' could not be found
Since
1.0.16
int desiteCore::ProjectAPI::showViewpointByID ( QString  id)
slot

Show a viewpoint by ID.

Returns
1 : ok
-1 : viewpoint 'id' could not be found
Since
1.3.5
void desiteCore::ProjectAPI::startEXE ( QString  prg,
QString  args 
)
slot

Start program

Search order for programs is:
1) absolute path
2) application directory
3) project directory

Since
1.0.17, 18 jul 2012, jh
void desiteCore::ProjectAPI::zoomToAllDocuments ( )
slot

Documents have a location. Zoom the screen so all documents are fitted in the 3D-view.

void desiteCore::ProjectAPI::zoomToAllResources ( )
slot

Resources (Instances) have a location. Zoom the screen so all resources are fitted in the 3D-view.

void desiteCore::ProjectAPI::zoomToLocationGK ( double  rw,
double  hw,
double  h 
)
slot

Zoom to location in Gauss-Krüger coordinates.

void desiteCore::ProjectAPI::zoomToObjects ( QString  objIDList)
slot
Since
1.9.0, 09 may 2016, jh
void desiteCore::ProjectAPI::zoomTopView ( )
slot

Show elements from top. Zoom to visible if no elemets are selected, otherwise zoom to selected objects.

Since
1.0.16
void desiteCore::ProjectAPI::zoomToSelected ( )
slot

Zoom to selected 3D-objects.

The view is adjusted in such a way that all selected 3D-objects fit into the current view. The view direction (vector eye -> poi) is not changed, just the eye point is moved.

Since
1.0.16
void desiteCore::ProjectAPI::zoomToSelectedDocuments ( )
slot

Documents have a location. Zoom the screen so the selected documents are fitted in the 3D-view.

void desiteCore::ProjectAPI::zoomToSelectedResources ( )
slot

Resources (Instances) have a location. Zoom the screen so the selected resources are fitted in the 3D-view.

void desiteCore::ProjectAPI::zoomToVisible ( )
slot
Since
1.0.16
void desiteCore::ProjectAPI::zoomToVisibleDocuments ( )
slot
Since
1.9.0, 09 apr 2016, jh
void desiteCore::ProjectAPI::zoomToVisibleResources ( )
slot
Since
1.9.0, 09 apr 2016, jh

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

Created: Mon Dec 11 2017 05:07:33