MainPage   Related pages 
Functions | List of all members
ProjectAPI Reference

Functions

int message (string)
 
bool sendRemoteMessage (string message)
 
object getVisualizationOptions ()
 
void setVisualizationOptions (object opt)
 
object getPainterOptions ()
 
void setPainterOptions (object opt)
 
var getLocation ()
 
void setLocation (var location)
 
var getImportSettings ()
 
void setImportSettings (var settings)
 
Tools
void startEXE (string prg, string args)
 
void showOnScreenKeyboard ()
 
void openLink (string url, bool useDesktopService)
 
string showOpenFileDialog (string caption="", string directory="", string filter="")
 
string showSaveFileDialog (string caption="", string directory="", string filter="")
 
Project
void openProject (string url, bool useSessionData=false)
 
int saveProject ()
 
int saveProjectArchive (string filename, string packBookmark)
 
array< object > import3DModels (var sourceFilePaths, var options)
 
array< object > importTimeSchedules (var sourceFilePaths)
 
array< object > importBillsOfQuantities (var sourceFilePaths)
 
int exportModel (string filePath, array< string > modelIDs, object options)
 
string exportBCF (array< string > sourceIds, string targetPath, string targetFileBaseName, string bcfVersion="2.1")
 
var exportCheckRuns (array< string > sourceIds, string targetFilePath, object options)
 
var importCheckRuns (var sourceFilePaths)
 
var importBCF (string sourceFilePath)
 
int redirectDocument (string modelId, string newSourceFilePath)
 
Objects
void filterElements (string pName, string pType, string pattern, bool checkInh=true, string domainCombination="geometry")
 
void showAll (bool repaint, string domainCombination="geometry")
 
void showAllElements (var domains=var())
 
void hideAll (bool repaint, string domainCombination="geometry")
 
void hideAllElements (var domains=var())
 
void showElements (var elementIDs, bool includeBlocked=false, var domains=var())
 
void showElementsOnly (var elementIDs, var domains=var())
 
void hideElements (var elementIDs, bool includeBlocked=false, var domains=var())
 
void setElementsVisible (bool visible, var elementIDs)
 
void setAllElementsVisible (bool visible, var domains)
 
void clearSelection (bool repaint, string domainCombination="geometry")
 
void selectVisible ()
 
void selectVisibleGeometric ()
 
void selectElements (string idList, bool flag, string domainCombination="geometry")
 
void setElementsSelected (bool selected, var elementIDs)
 
void setAllElementsSelected (bool selected, var domains)
 
void zoomToSelected ()
 
void zoomToVisible ()
 
void zoomToObjects (string objIDs)
 
void zoomToAllDocuments ()
 
void zoomToSelectedDocuments ()
 
void zoomToVisibleDocuments ()
 
void zoomToDocuments (array< string > idList)
 
void zoomToAllResources ()
 
void zoomToSelectedResources ()
 
void zoomToVisibleResources ()
 
void zoomToResources (array< string > idList)
 
void zoomToLocationGK (double rw, double hw, double h)
 
void zoomToLocationGps (double lat, double lon)
 
void moveToLocationGps (double lat, double lon)
 
void zoomTopView ()
 
string getVisible (string domainFilter="geometry")
 
array< string > getVisibleElements (string domainFilter="geometry")
 
bool hasVisible (string domainFilter="all")
 
int countVisible (string domainFilter="geometry")
 
string getSelected (string domainFilter="geometry")
 
array< string > getSelectedElements (string domainFilter="geometry")
 
bool hasSelected (string domainFilter="all")
 
int countSelected (string domainFilter="geometry")
 
void setVisualisationMode (int mode, bool repaint=true)
 
int getVisualisationMode ()
 
object showElementsOOBBSide (string IDList, double prec=1.e-2)
 
object showElementsOOBBTop (string IDList, double prec=1.e-2)
 
object showElementsOOBBFront (string idList, double prec=1.e-2)
 
void showDimensionsPainter (bool showAABB, bool showOOBB)
 
void hideDimensionsPainter ()
 
Viewpoints, Clipping, Camera, Light Sources
void showHomeView ()
 
int showViewpointByID (string id)
 
void addToViewPoint (string vpID, string objIdList)
 
void removeFromViewPoint (string vpID, string objIdList)
 
var createViewpointFromCurrentView (string parentID, object options)
 
string getCurrentViewAsImage (int width=1920, int height=1080)
 
bool saveCurrentViewToFile (string filename, int width=1920, int height=1080)
 
object getViewpointData (string vpID, array< string > filterKeys, bool whitelist=true)
 
bool setViewpointData (string viewpointID, object data)
 
void setViewpointDataToCurrentView (object data)
 
object getViewpointDataFromCurrentView (array< string > filterKeys, bool whitelist=true)
 
Tool Tips
int activateObjTooltip (string name)
 
void deactivateObjTooltip ()
 
string getActiveTooltipName () const
 
void setDocumentsTooltipsVisible (bool v)
 
bool getDocumentsTooltipsVisible ()
 
void setResourcesTooltipsVisible (bool v)
 
bool getResourcesTooltipsVisible ()
 
4D Simulation
void set4dIsActive (bool active)
 
bool get4dIsActive ()
 
bool set4dDateTime (date dt)
 
date get4dDateTime ()
 
object get4dOptions ()
 
void set4dOptions (object opt)
 
date get4dProjectStart ()
 
date get4dProjectFinish ()
 
array< string > get4dActiveTaskList (date dt, bool linkedToObjectsOnly=false)
 
array< string > get4dActiveTaskListByInterval (date dtStart, date dtEnd, bool linkedToObjectsOnly=false)
 
array< string > get4dFinishedTaskList (date, bool linkedToObjectsOnly=false)
 
array< string > get4dProspectiveTaskList (date, bool linkedToObjectsOnly=false)
 
string get4dTaskColor (string taskID, date dt, string defaultColorName="#000")
 
Building Structure
void setBsPlanUnderlayActive (bool active)
 
bool getBsPlanUnderlayActive ()
 
Navigation Modes
object getHandlerMode ()
 
bool setHandlerMode (object handlerInfo)
 
array< string > getCreatedPins ()
 
var createObjectsFromMeasurements (object options)
 
Pick Points, Measure
object getPickedPoint ()
 
object getAllPickedPoints ()
 
object getPickedPointGPS ()
 
object getPickedPointGK ()
 
object getPickedFaces ()
 
void clearMeasureItems ()
 
Clash Detection
void showClashList (string clashIdList)
 
WebForms
object getWebFormLocations ()
 
void createWebFormBookmark (string url, string name)
 
int removeWebFormBookmark (string url)
 
Version Comparison
var import3DModelIntoVersionComparison (string sourceFilePath, string referenceModelID)
 
void clearVersionComparison ()
 
object getVersionComparisonOptions ()
 
bool setVersionComparisonOptions (object options)
 
bool runVersionComparison ()
 
object getVersionComparisonResults (array< string > filterKeys)
 
var getPropertyValueFromVersionComparison (string objectID, string propertyName, string propertyType, bool checkInheritance=true)
 
void showAllElementsInVersionComparison ()
 
void showElementsInVersionComparison (var elementIDs)
 
void hideAllElementsInVersionComparison ()
 
void hideElementsInVersionComparison (var elementIDs)
 
- Functions inherited from AutomationAPI
int setProjectNumber (string s, bool overwriteExisting=false)
 
int setProjectShortDescription (string s, bool overwriteExisting=false)
 
int setProjectLongDescription (string s, bool overwriteExisting=false)
 
void setTempValue (string name, var value)
 
var getTempValue (string name)
 
array< string > getListOfTempValues ()
 
void clearListOfTempValues ()
 
string getModelByElement (string id, string domainFilter="all")
 
array< string > getModelListByName (string name, string domain="geometry")
 
array< string > getModelListByDomain (string domainFilter="all")
 
string getRootNodeByModel (string modelId)
 
array< string > getRootNodeListByDomain (string domainFilter="all")
 
array< string > getRootContainerList (string modelName)
 
string createModel (string name, bool createRootC=true, string domain="geometry")
 
object getModelMetaData (string modelId)
 
int deleteModel (string id)
 
var getModelImportSettings (string modelId)
 
array< string > getAllElements (string domainFilter="geometry")
 
bool hasElement (string id)
 
array< string > filterByProperty (array< string > inputList, string propertyName, string propertyDatatype, string filterPattern, bool checkInherited=true, string domains="geometry")
 
array< string > filterByStatus (array< string > inputList, string status, bool value=true, string domains="geometry")
 
void itClear ()
 
int itByFilter (string propName, string propDatatype, string filterPattern, bool checkInh=true, string domain="geometry")
 
int itFilterByStatus (string status, bool enabled=true, string domain="geometry")
 
int itByObjectList (string idList)
 
string itGetObjectList ()
 
bool itHasNext ()
 
string itNext ()
 
int itCount ()
 
void itToFront ()
 
array< var > itGetAvailablePropertyValues (string propName, string propDatatype, int maxValues)
 
void itSetupDbCache (string propName, string propType)
 
void itSetMaterial (string matId)
 
void itColorCode (string propName, string propDT)
 
void itColorCodeNumber (string propName, string propDT, double intervalSize)
 
void itCalcOOBB (double eps)
 
void itUpdateOOBB (double eps)
 
void itCalcOOBBxy (double eps)
 
void itUpdateOOBBxy (double eps)
 
string findContainerByName (string parentId, string name, string lookupDomain="all")
 
bool isContainer (string id)
 
int startProjectTransaction (string domain="geometry")
 
int endProjectTransaction (string domain="geometry")
 
var createObject (string parentID, object objectMap)
 
string createObjectFromXml (string parentId, string objectXML)
 
int deleteObjects (string idList)
 
object getAsJSON (string objId)
 
int setAsComposite (string id, bool composite)
 
int setLinkedObjects (string elementID, string IDList)
 
int removeAllLinkedObjects (string id)
 
int removeLinkedObjects (string id, string linkedIdList)
 
int updateRuleBasedLinks (string domainName, bool visibleOnly=false)
 
int removeRuleBasedLinks (string domainName)
 
void lockObjects (string idList)
 
void unlockObjects (string idList)
 
void unlockAllObjects ()
 
string getLocked ()
 
int countLocked ()
 
array< string > getListOfObjTooltips ()
 
void addObjectListToTooltip (string idList, string tooltipname)
 
void removeObjectListFromTooltip (string idList, string tooltipname)
 
int createPropertyType (string propName, string propDatatype, string uomCode, bool isInh, int target, string domainName="all")
 
int setPropertyTypeMetaData (string pName, string ptype, object metadata)
 
int deletePropertyType (string propertyName, string propertyDatatype, string domainName="all")
 
array< var > getPropertyTypeBookmarkList ()
 
object getPropertyTypeBookmarkByID (string bookmarkId)
 
int activatePropertyTypeBookmark (string bkmId)
 
bool setPropertyTypeActive (string pName, string ptype, string domain, bool active)
 
int setAllPropertyTypesActive ()
 
int removePropertyTypeBookmarkByID (string bkmId)
 
string addPropertyTypeBookmark (object bookmarkConfig)
 
int setPropertyValue (string objId, string propName, string propDataType, var value)
 
int deleteProperty (string objId, string propName, string propDatatype)
 
array< var > getPropertyValues (string propName, string propDatatype, int maxValues=0, string domainName="all", bool getNullValues=false)
 
array< var > getPropertyValuesByObjectList (string propertyName, string propertyDatatype, bool checkInherited, var objectIdList, int maxValues=0, string domains="all", bool getNullValues=false)
 
object getPropertyListAsJSON (object options)
 
void setPropertyListAsJSON (object propmap, object opt)
 
object getPropertyScriptList () const
 
string getPropertyScriptCode (string domain, string pname, string datatype) const
 
string getPropertyScriptFgColor (string domain, string pname, string datatype) const
 
string getPropertyScriptBgColor (string domain, string pname, string datatype) const
 
int setPropertyScriptCode (string domain, string pname, string datatype, string code)
 
int setPropertyScriptFgColor (string domain, string pname, string datatype, string code)
 
int setPropertyScriptBgColor (string domain, string pname, string datatype, string code)
 
object addPropertyScript (string domain, string pname, string datatype, string code=string())
 
int removePropertyScript (string domain, string pname, string datatype)
 
void propertyScriptClearCache (string domain="all", string pname="", string datatype="")
 
object getPropertyScriptOptions (string domain, string pname, string datatype)
 
int setPropertyScriptOptions (string domain, string pname, string datatype, object opt)
 
int synchronizeDocumentContainer (string containerId, bool waitForCompletion=false)
 
void resetDocumentMetaData (string objId)
 
array< object > findDocumentsByLocationGps (double lat, double lon, double distance, array< string > idList=array< string >())
 
array< object > findDocumentsByLocationRangeGps (array< string > gpsCoordinates, double distance, array< string > idList=array< string >())
 
array< object > findDocumentsByLocationGk (double rw, double hw, double distance, array< string > idList=array< string >())
 
array< string > findDocumentsByDate (date start, date end, array< string > idList=array< string >(), bool useRef=false)
 
string createCalendar (string name, string comment)
 
int removeCalendar (string calendarID)
 
array< string > getCalendarList ()
 
string getCalendarByName (string name)
 
string getDefaultCalendar ()
 
string getCalendarByTask (string taskID, bool checkInh=true)
 
int setCalendar (string taskID, string calendarID)
 
int removeCalendarFromTask (string taskID)
 
int setCalendarOptions (string calendarID, object options)
 
object getCalendarOptions (string calendarID)
 
array< object > getCalendarExceptions (string calendarID)
 
int addCalendarExceptions (string calendarID, array< object > exceptions)
 
int removeCalendarException (string calendarID, var date)
 
int clearCalendarExceptions (string calendarID)
 
int setCalendarWorkingTime (string calendarID, object workingTime)
 
object getCalendarWorkingTime (string calendarID)
 
int calcWorkInMinutes (date start, date finish, string calendarID=string())
 
array< string > getTaskRestrictionsList ()
 
string getTaskRestrictionsByName (string name)
 
int setTaskRestrictions (string taskID, string restrictionsID)
 
int removeTaskRestrictions (string taskID)
 
object getVisualisationList ()
 
int setVisualisationByID (string taskIDList, string visID)
 
int removeVisualisation (string taskIDList)
 
int setTaskMode (string taskID, int mode)
 
int recalculateActivityProject (string taskID=string(), bool visibleOnly=false)
 
object calcPropertyValuesOverTime (string propName, string propType, object options)
 
int createTimeSchedule (object config)
 
int hasContact (string objId1, string objId2, object options=object())
 
string createContactObject (string parentId, string objId1, string objId2, string matId, object options=object())
 
array< string > cutObject (string parentId, string objId, object plane=object(), bool closeCuts=true, bool splitUnconnectedParts=true)
 
string mergeObjects (string parentContainerId, string idList, bool skipClosed=false, bool keepTransparency=false, bool keepCommonProperties=false, bool replaceParent=false)
 
bool isIncludedIn (string objId1, string objId2)
 
int isPointIncludedIn (double x, double y, double z, string objId, double tol=1.e-5)
 
int checkIntersection (string objId1, string objId2, double tolerance=-0.00001)
 
int transformObject (string objId, string transformation)
 
int setAsOpening (string objId, string openingIDList)
 
string getProjectionAsSvg (string idList, object options=object())
 
double calcDistance (string objId1, string objId2)
 
var calculateDistance (string meshID1, string meshID2)
 
int swapOrientationOfTriangles (array< object > idList)
 
var addMaterial (string modelID, var materialData)
 
var setMaterialData (string materialID, var materialData)
 
var getMaterialData (string materialID)
 
var removeMaterial (string materialID)
 
string createMaterial (string matXml, string modelId=string())
 
int deleteMaterial (string matId)
 
array< string > getMaterialList ()
 
string getMaterialAsXmlByID (string matId, bool formatXML=true)
 
object getMaterial (string matId)
 
string getMaterialIDByName (string matName)
 
void updateMaterial (string matId, string xmlMat)
 
int setMaterialToObjects (string matId, var objectIds)
 
int setTransparency (string objectIds, float defaultTransparency=0.95)
 
void resetMaterials (bool updateUI=true)
 
void colorCodeObjects (array< string > objectIds, string propertyName, string propertyDatatype, double intervalSize=1.0)
 
string createColorSchema (string setContainerId, string name)
 
string createColorSchemaFromCurrentMaterials (string name, bool updateExisting, object options=object())
 
int deleteColorSchema (string namePattern)
 
array< string > getColorSchemaList ()
 
string getCurrentColorSchema ()
 
bool activateColorSchemaByName (string name)
 
void showWireModeSchema (string name)
 
void clearWireMode ()
 
void setObjectsToWireMode (string ids, bool wired)
 
string createWireModeSchema (string ids, string wmName, bool overwrite=false)
 
string getWired ()
 
int countWired ()
 
double getBBoxMinX ()
 
double getBBoxMaxX ()
 
double getBBoxMinY ()
 
double getBBoxMaxY ()
 
double getBBoxMinZ ()
 
double getBBoxMaxZ ()
 
void updateBoundingBox3DView ()
 
int calcOOBB (var objectIds, double eps=0.001)
 
int updateOOBB (var objectIds, double eps=0.001)
 
int calcOOBBxy (var objectIds, double eps=0.001)
 
int updateOOBBxy (var objectIds, double eps=0.001)
 
object getBoundingBoxCommon (var objectIds)
 
object getOOBBCommon (var objectIds)
 
object getOOBBxyCommon (var objectIds)
 
double checkOverlapOBB (string id1, string id2, double eps=0.001)
 
string createSelectionSets (string propertyTypes, string rootName, object config=object())
 
array< string > getRootNodeListSelectionSets (string domainFilter="all")
 
int addToSelectionSetGeometry (string setId, string objectIDList)
 
int removeFromSelectionSetGeometry (string setId, string objectIDs)
 
string createSelectionSet (string name, string parentID=string())
 
bool removeSelectionSet (string selsetID)
 
int updateSmartSets (array< string > smartSetIDs=array< string >())
 
string addRegionToAlignment (string alignmentId, object setting)
 
int removeAllRegionsFromAlignment (string alignmentId)
 
int addRangeToRegion (string regionId, double fromStation, double toStation, string alignmentId=string())
 
int removeRangeFromRegion (string regionId, double fromStation, double toStation, string alignmentId=string())
 
int removeAllRangesFromRegion (string regionId, string alignmentId=string())
 
int createDirectory (string path, string dirName)
 
bool writeFile (string filePath, string content, string encoding=string())
 
bool appendToFile (string filePath, string content, string encoding=string())
 
bool removeFile (string filePath)
 
bool copyFile (string fnFrom, string fnTo)
 
bool moveFile (string fnFrom, string fnTo)
 
bool checkIfFileExists (string filePath)
 
bool openFile (string filePath, string encoding=string())
 
bool writeToFile (string content)
 
bool closeFile ()
 
array< string > readTextFile (string filename, bool ignoreLineBreakesInDoubleQuotes=false, string codec=string())
 
string readTextFileAsString (string filePath, string codec=string())
 
var readFileInChunks (string filePath, object options)
 
object readCsvFile (string filePath, string delimiter=";", string encoding="Windows-1252")
 
int csvOpen (string filePath, string delimiter=";", string encoding="Windows-1252")
 
array< string > csvNextLine ()
 
bool csvHasNextLine ()
 
bool csvClose ()
 
string readImageFile (string filename, string targetFormat="", bool applyExifRotation=false)
 
array< object > getDirectoryEntryList (string dirPath, bool filesOnly=false, string orderBy="Name")
 
bool dbIsLocalCopy ()
 
string dbGetFilepath () const
 
int dbOpen (const var connectionData=var())
 
bool dbClose ()
 
void dbCheckIn ()
 
void dbCheckOut (array< string > propList)
 
bool dbQueryExec (string sqlQuery)
 
object dbQueryRecordset (string sqlQuery, string key, int maxNumberOfRows=0)
 
bool dbEndQueryExec ()
 
bool dbQueryNext ()
 
var dbQueryValue (int column)
 
string dbQueryLastError ()
 
int setPropertyValueDB (string objIdList, string propName, string propDataType, string propDomain, var value, bool createType=true)
 
int writePropertyValueDB (string objIdList, string propName, string propDataType, string propDomain, var value, bool createType=true)
 
bool startTransaction ()
 
bool endTransaction ()
 
bool dbGetImmediateUpdate ()
 
void dbSetImmediateUpdate (bool)
 
int dbClearCache (string propName, string propType)
 
void dbClearCacheAll ()
 
int dbDeleteProperty (string objIdList, string propName, string propType)
 
int dbAssertTable (string tableName, array< string > columnsList)
 
bool setCheckActive (string checkRunID, bool active)
 
int runCheck (string checkRunID)
 
int clearCheckResults (string checkRunID)
 
int setCheckOptions (string checkRunID, object options)
 
object getCheckOptions (string checkRunID) const
 
int setCheckFilterList (string checkRunID, array< object > filterList, bool rightSet=false)
 
array< object > getCheckFilterList (string checkRunID, bool rightSet=false) const
 
int setCheckItems (string checkRunID, array< string > elementIDist, bool rightSet=false)
 
array< string > getCheckItems (string checkRunID, bool rightSet=false) const
 
int setPostProcessingCode (string checkRunID, string code)
 
string addCheckRule (string checkRunID, object rule, string parentRuleID=string())
 
int removeCheckRule (string checkRunID, string type, string ruleID)
 
int clearCheckRules (string checkRunID, string ruleTypeFilter=string())
 
object getCheckRules (string checkRunID, string ruleTypeFilter=string())
 
void enableGeoLocation (int msecInterval=60)
 
void disableGeoLocation ()
 
object currentGeoPosition ()
 
int setBoQBreakdownStructure (string boqModelID, string templateStr)
 
int sortContainerByProperty (string containerId, string propName, string propType, bool ascending=true, int maxDepth=0)
 
int validateIfcCompatibiliy (string bsModelID)
 
- Functions inherited from CoreAPI
string addDays (string dateStr, int nrDays)
 
int getCalendarWeek (date dt)
 
string createID ()
 
long calcHashcode (string str)
 
string compressToIfcGuid (string id)
 
string uncompressFromIfcGuid (string ifcGuid)
 
bool checkRegExp (string value, string pattern)
 
double calcSlantedArea (string objId, double angleMin=0.0, double angleMax=45.0)
 
object calcGpsCoordsByStation (string objId, double station)
 
object calcGpsCoordsByModelCoords (double x, double y)
 
object calcModelCoordsByGpsCoords (double lat, double lon)
 
object calcGkCoordsByModelCoords (double x, double y, double z)
 
object calcModelCoordsByGkCoords (double r, double h)
 
object calcGkCoordsByGpsCoords (double lat, double lon)
 
object calcGpsCoordsByGkCoords (double rw, double hw)
 
object convertCoordinates (object coordinates)
 
string idListToStr (array< string > idList)
 
array< string > strToIdList (string strIDList)
 
var mapToExternalIDs (const array< string > cpIDs)
 
var mapFromExternalIDs (const array< string > cpExternalIDs)
 
var getFileInfo (string filePath)
 
string getAbsolutePath (string filePath)
 
string getBaseName (string filePath)
 
string getFileName (string filePath)
 
string getApplicationDirectory ()
 
string getApplicationFilename ()
 
string getApplicationLanguage ()
 
string getVersionAsString ()
 
object getVersion ()
 
bool requireVersion (int major, int minor, int patch)
 
string getDomainByElement (string objId)
 
string getUserName ()
 
string getProjectName ()
 
string getProjectDirectory ()
 
object getProjectLocation () const
 
object getProjectInfo ()
 
array< string > getContainedElements (string containerId, int maxDepth, bool loadExternal=true)
 
int countContainedElements (string containerId, int maxDepth, bool loadExternal=true)
 
string getParent (string objId)
 
array< string > getOpenings (string objId)
 
array< string > getParts (string objId)
 
array< string > getLinkedObjects (string objectIDList, string resultDomains="all", string objectLookupDomains="all")
 
bool isVisible (string objId)
 
bool isSelected (string objId)
 
bool isLocked (string objId)
 
bool isWired (string objId)
 
var getPropertyValue (string objId, string propName, string propType, bool inh=true)
 
array< object > getPropertyValuesByObject (string objId, string filterpattern="*")
 
var getPropertySource (string objId, string propName, string propType, bool inh=true)
 
string getPropertyUnit (string propName, string propType)
 
object getPropertyTypeMetaData (string propName, string propType)
 
array< object > getPropertyTypeList (string domain="all", string filterPattern="*", bool activeOnly=false)
 
array< object > getPropertyTypeListByObject (string objId, string filterPattern="*")
 
bool isPropertyInherited (string objId, string propName, string propType)
 
string getPropertyValueRange (string idList, string propName, string propType, string domainFilter="geometry")
 
var evaluateFormula (string code, string id, string id_otherdomain=string())
 
string prepareJsCode (string code, string id, int dec=-1, string frmt="%L1", int fieldWidth=10, QChar fillChar=QChar())
 
array< string > extractPropertyNames (string code, string startTag="[[", string endTag="]]")
 
array< object > getGlobalProjectProperties ()
 
array< object > getPointList (string objId)
 
object getPointOnAlignmentAtStation (string alignmentId, double d)
 
double getStationOfProjectedPoint (string alignmentId, double x, double y, double z=0.0)
 
array< string > getRegionsOfAlignment (string alignmentId)
 
array< object > getRangesOfRegion (string alignmentID, string regionID)
 
double getValueOfAlignmentRegion (string alignmentID, string regionID)
 
int getTaskMode (string taskID)
 
string getTaskVisualisation (string taskID)
 
string getTaskRestrictionsByTask (string taskID)
 

Additional Inherited Members

- Signals inherited from AutomationAPI
void synchronizationFinished (bool success)
 
void fileChunkReceived (string data)
 
void geoPositionUpdated (object pos)
 

Function Documentation

◆ activateObjTooltip

int activateObjTooltip ( string  name)
function

Activate object tooltip.

Parameters
nameName of tooltip to be activated.
Returns
Index of activated Object-Tooltip.
Since
1.3.2, 28 mar 2014, jh

◆ addToViewPoint

void addToViewPoint ( string  vpID,
string  objIdList 
)
function

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

Since
2.0.16, 2017-09-04, ah (port from 1.4)

◆ clearMeasureItems

void clearMeasureItems ( )
function

Remove all measure items (current items and those sticked to 3d view).

Since
1.9.0, Aug 2016

◆ clearSelection

void clearSelection ( bool  repaint,
string  domainCombination = "geometry" 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Unselect all objects.

Parameters
repainttrue: Refresh 3D-view
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setAllElementsSelected() instead. For example:
desiteAPI.setAllElementsSelected(false, 'geometry');

◆ clearVersionComparison

void clearVersionComparison ( )
function

Clear Version Comparison. Remove all models from list and reset results of last comparison run.

Since
3.1.1, 31 Oct 2022

◆ countSelected

int countSelected ( string  domainFilter = "geometry")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get number of selected elements.

Parameters
domainFilterCount only visible of given domains
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getSelectedElements(), then count.

◆ countVisible

int countVisible ( string  domainFilter = "geometry")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get number of visible elements.

Parameters
domainFilterCount only visible of given domains
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getVisibleElements(), then count.

◆ createObjectsFromMeasurements

var createObjectsFromMeasurements ( object   options)
function

Create geometric objects from current Measurements.
Measuring mode must be active and at least one measurement must exist.
New geometric objects will be created in model "Measurements".

Parameters
optionsOptions for object creation and linking.
Example / Default Settings:
{
"mergeFacesAndPolygons": true,
"linkToMeasuredGeometry": true,
"linkToTypeID": "",
"select": true
}
Returns
IDs of all created objects. Error code will be 0 on success, > 0 on error (check the message as well).
{
"createdObjects": ["464b7c4b-9048-4ca5-906d-719ad1642d7f","ff3c4ddc-a5c0-4728-a090-0d51d685b51e"],
"error":
{
"code": 0,
"message": "OK"
}
}
Since
3.3.0, 19 Jun 2023

◆ createViewpointFromCurrentView

var createViewpointFromCurrentView ( string   parentID,
object   options 
)
function

Create a Viewpoint from current view.

Parameters
parentID: ID of a Model, Container or Issue within the Issues Domain
options: The options object looks like this (all keys optional, defaults as shown unless defined otherwise in the project configuration):
{
"name": "newViewpoint",
"saveVisible": true,
"linkVisible": false,
"saveSelected": false,
"linkSelected": false,
"saveLocked": false,
"saveClipping": true,
"saveRedlining": true,
"saveMeasuring": true
}
Returns
ID of new object, or one of the following codes on error:
-1 : parent object not found
-2 : failed to create viewpoint
Since
2.9.0, 22 Nov 2021

◆ createWebFormBookmark

void createWebFormBookmark ( string  url,
string  name 
)
function

Create a WebForm bookmark by URL and name. Note that if a bookmark for the URL pre-exists, the name of the existing bookmark will be changed.

Since
2.5.3, 03 Dec 2019

◆ deactivateObjTooltip

void deactivateObjTooltip ( )
function

Deactivate object tooltip.

Since
1.3.2, 28 mar 2014, jh

◆ exportBCF

string exportBCF ( array< string >  sourceIds,
string  targetPath,
string  targetFileBaseName,
string  bcfVersion = "2.1" 
)
function

Export a list of Issues/Viewpoints to a BCF file.

Parameters
sourceIdsList of Issue and/or Viewpoint IDs to be exported
targePathLocation where the resulting combined BCF file is stored
targetFileBaseNameThe file name given here will be extended by ".bcf".
bcfVersionOne of "2.1" (default) or "3.0".
Returns
Filename (including path) of the resulting BCF file. Empty string on error.

Example:

var sourceIdList = ['f039aada-0f3e-4b34-931a-f64500576516','d716d3ee-5c84-4d8f-949c-7fc26a9130df'];
desiteAPI.exportBCF(sourceIdList, 'C:/test/', 'output', '2.1');
C:/test/output.bcf
Since
2.5.2, 01 Aug 2019
2.9.2, 17 Feb 2022 : Dropped support for BCF versions 1.0 and 2.0, adopted 3.0

◆ exportCheckRuns

var exportCheckRuns ( array< string >   sourceIds,
string  targetFilePath,
object   options 
)
function

Export model check runs (and optionally results) to an XML file.

Parameters
sourceIdsList of IDs. These must be either Check Runs or top level containers (like model root nodes).
targetFilePathFull path of target file for the exported data.
optionsmap, see below for possible keys and values.

Options:

{
writeResults: false
}
Returns
Error object containing "code" and "message". Code 0 indicates success.

Example:

var elements = desiteAPI.getRootNodeListByDomain('qa');
var options = {"writeResults" : false};
var ret = desiteAPI.exportCheckRuns(elements, 'C:\\Temp\\test.qa.xml', options);
JSON.stringify(ret, 0, 4);
{
"code": 0,
"message": "OK"
}
Since
3.1.1, 11 Oct 2022

◆ exportModel

int exportModel ( string  filePath,
array< string >   modelIDs,
object   options 
)
function

Export geometric model(s) to a file.
This will only work for DESITE products that support model imports (e.g. MD, MD PRO, but not CUSTOM).

Parameters
filePathFile name and path of the model(s) to be exported. Must be specified if export dialog is not shown.
modelIDsArray of model IDs. If more than one model ID is specified, a consolidated model will be exported.
optionsExport options, see below
Returns
error code:
1 success
-1 invalid filename
-2 could not get all models
-3 export failed / file could not be written
-4 unsupported file suffix
var modelIdList = [
'f039aada-0f3e-4b34-931a-f64500576516',
'd716d3ee-5c84-4d8f-949c-7fc26a9130df'
];
var expOpt = {
"exportVisibleOnly" : true,
"exportCurrentMaterials" : true,
"exportActivePropertiesOnly" : true,
"exportInheritedProperties" : true,
"removeEmptyContainers" : true,
"removeNamespaces" : true,
"buildingStructureModelID" : "",
};
var errCode = desiteAPI.exportModel("D:/tmp/export.ifc", modelIdList, expOpt);
Property Default Value IFC CPIXML CP2 OBJ SKP
writeCommonRoot false X
exportLocalCoordinates false X X X X
exportVisibleOnly false X X X X X
exportCurrentMaterials false X X X X X
exportActivePropertiesOnly false X X X X
exportInheritedProperties false X X X X
exportEvaluatedProperties true X X X X
propertyBookmarkName "" X X X X
removeEmptyContainers true X X X X
removeNamespaces true X X X X
exportProxies false X
modeSubparts 0 (1/2) X
propertySectionVersion "1.3" ("1.7") X
writeOptOOBB true X
buildingStructureModelID "" X X
writeBuildingStructurePropertiesfalse X
exportOpenings false X X X X X
exportGrids true X
exportAlignments true X
mappingFile "" X
createPropertySetDesite true X
exportLines true X X X
exportTextures true X X X
swapIndexes [0,1,2] X X
exportSKPVersion 10 (=2017) X
createInstances false X
preserveHierarchy false X
exportCustomLocation false X
customTranslation {x:0,y:0,z:0} X
Since
2.9.0, 30 Jul 2021
3.0.5, 15 Jul 2022 : Consider all available property providers, not only models and project repository
3.2.1, 18 Jan 2023 : Removed option "propertyBookmark" which didn't work properly (use "propertyBookmarkName" only)
3.3.0, 15 Nov 2023 : Removed option "writeGlobalCoordinates", this option will now always be applied
3.4.1, 02 Feb 2024 : Added option "exportLocalCoordinates", inverted behavior of former option "writeGlobalCoordinates" : Added option "exportCustomLocation" and "customTranslation", set a custom location for IFC files

◆ filterElements

void filterElements ( string  pName,
string  pType,
string  pattern,
bool  checkInh = true,
string  domainCombination = "geometry" 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Filter elements and show matching objects only.

Since
1.0.16
2.9.3, 17 Mar 2022 : deprecated
Deprecated:
Use a combination of filterByProperty() and setElementsVisible().

◆ get4dActiveTaskList

array< string > get4dActiveTaskList ( date  dt,
bool  linkedToObjectsOnly = false 
)
function

Get list of tasks active on date 'dt';

Since
1.5.0, 01 Dec 2015

◆ get4dActiveTaskListByInterval

array< string > get4dActiveTaskListByInterval ( date  dtStart,
date  dtEnd,
bool  linkedToObjectsOnly = false 
)
function

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

Since
1.5.0, 01 Dec 2015

◆ get4dDateTime

date get4dDateTime ( )
function

Get current date/time of simulation.

Since
1.5.0, 14 Oct 2015

◆ get4dFinishedTaskList

array< string > get4dFinishedTaskList ( date  ,
bool  linkedToObjectsOnly = false 
)
function

Get list of tasks finished on date 'dt';

Since
1.5.0, 01 Dec 2015

◆ get4dIsActive

bool get4dIsActive ( )
function

Check if 4d simulation is activated.

Since
1.5.0, 14 Oct 2015

◆ get4dOptions

object get4dOptions ( )
function

Get 4D options.

{
"animationName":"A1",
"drawLegend":true,
"drawTasks":true,
"legendMaxRows":50,
"showAnimation":true,
"showOnlyTasksWithLinkedObjects":false,
"simulateVisibleTasks":false,
"simulationStep":1,
"simulationStepMode":"Interval",
"startFinishWithTime":false,
"startProperty":Start##xs:dateTime,
"finishProperty":Finish##xs:dateTime,
"durationProperty":Duration##xs:string
}
Since
1.5.0, 14 Oct 2015
2.6.2, 29 Sep 2020 : start/finish/duration properties

◆ get4dProjectFinish

date get4dProjectFinish ( )
function

Get finish date, i.e. last finish date.

Since
1.5.0, 14 Oct 2015

◆ get4dProjectStart

date get4dProjectStart ( )
function

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

Since
1.5.0, 14 Oct 2015

◆ get4dProspectiveTaskList

array< string > get4dProspectiveTaskList ( date  ,
bool  linkedToObjectsOnly = false 
)
function

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

Since
1.5.0, 01 Dec 2015

◆ get4dTaskColor

string get4dTaskColor ( string  taskID,
date  dt,
string  defaultColorName = "#000" 
)
function

Get color of task 'taskID' at date and time dt.

Since
1.5.0, 14 Oct 2015

◆ getActiveTooltipName

string getActiveTooltipName ( ) const
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get name of active tooltip.

Returns
Name of active object tooltip, else an empty string if no tooltip is active.
Since
1.3.6, 26 apr 2014, jh
Deprecated:

◆ getAllPickedPoints

object getAllPickedPoints ( )
function

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 );
{
"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

◆ getBsPlanUnderlayActive

bool getBsPlanUnderlayActive ( )
function

Draw plan underlay of building structure. Check if drawing is active.

Since
2.0, jh

◆ getCreatedPins

array< string > getCreatedPins ( )
function

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

Since
1.4.10, May 2015

◆ getCurrentViewAsImage

string getCurrentViewAsImage ( int  width = 1920,
int  height = 1080 
)
function

Get the current view as a Base64 encoded image.

Prior to DESITE version 3.0, the size of the resulting image was determined by the current viewport size.
The new default size is Full HD, which you can change by passing width and height parameters.

Example:

<html>
<head>
<script>
async function showView()
{
var s = await desiteAPI.getCurrentViewAsImage(200, 200);
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
2.9.0, 25 Nov 2021, added optional parameters width and height

◆ getDocumentsTooltipsVisible

bool getDocumentsTooltipsVisible ( )
function

Check if documents tooltip painter is activated.

◆ getHandlerMode

object getHandlerMode ( )
function

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

See also
setHandlerMode( object )
Since
1.9.0. 01 jul 2017, sl

◆ getImportSettings

var getImportSettings ( )
function

Get project's import settings with a list of parameters per format.

Example:

const settings = desiteAPI.getImportSettings();
console.log(JSON.stringify(settings, null, 4));
Since
3.3.0, 28 Aug 2023

◆ getLocation

var getLocation ( )
function

Get Location parameters.

Valid coordinate reference systems are "None", "GaussKruger", "UTM" and "Custom".

{
coordinateReferenceSystem: "GaussKruger",
coordinateReferenceSystemName: "",
easting: 2571684.290587,
height: 0,
northing: 5699397.321023,
surveyPoint: { x: 0, y: 0, z: 0 },
zone:"2"
}
Since
3.3.0, 13 Jun 2023

◆ getPainterOptions

object getPainterOptions ( )
function

Get Painter Options.

Returns an Object with the following Properties:

Property Type
drawSolid bool
drawTextures bool
drawWired (deprecated) bool
drawEdges bool
edgesColor list(3) of float (RGB)
edgesWidth int
drawComposites bool
drawNegative bool
drawParts bool
backfaceCulling bool
cullSmallGeometry bool
pixelThreshold int
alignmentsWidth int
alignmentsDrawLabels bool
alignmentsLabelScaleFactor double
alignmentsDrawConstructionLines bool
alignmentsSelectSegments bool
lockColor list(3) of float (RGB)
selectionColor list(3) of float (RGB)
drawOOBB bool
drawOOBBxy bool
drawTesselation bool
drawNormalVectors bool
scaleFactorNormals double
selectCompositeParts bool
selectAllCompositeParts bool
selectVisibleCompPartsOnly bool

Example:

var pOpt = desiteAPI.getPainterOptions();
if (pOpt.drawEdges) {
alert( 'Edges are drawn in color ' + pOpt.edgesColor[0] + ',' + pOpt.edgesColor[1] + ',' + pOpt.edgesColor[2] );
}
Since
1.3.8, 06 May 2014

◆ getPickedFaces

object getPickedFaces ( )
function

Get picked faces from measure handler (if active) as JS object.

Example:

JSON.stringify(desiteAPI.getPickedFaces(), undefined, 2);
{
"faces": [
{
"triangles": [
[
0,
1,
2
],
[
2,
3,
0
]
],
"vertices": [
[
1694.4953974440796,
-624.4960397721558,
38.35000101928711
],
[
1671.7195980255003,
-637.6460394364624,
38.35000101928711
],
[
1679.86959823302,
-651.7618397958863,
38.35000101928711
],
[
1702.645397651599,
-638.6118401315797,
38.35000101928711
]
]
}
]
}
Since
2.8.2, 25 May 2021

◆ getPickedPoint

object getPickedPoint ( )
function

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

Example:

JSON.stringify( desiteAPI.getPickedPoint(), undefined, 2 );
{
"ip":[-9.793106549424811,-9.601763445601856,16.2],
"p":[-9.793106549424811,-9.601763445601856,16.2]
}
Since
1.9.0, 08 mar 2016, jh

◆ getPickedPointGK

object getPickedPointGK ( )
function

Get last picked point from measure handler (if active) as JS object, in Gauss-Krueger coordinates.

Example:

JSON.stringify( desiteAPI.getPickedPointGK(), undefined, 2 );
{
"h": 5699375.383960576,
"r": 2571694.2875580466,
"z": 38.35000101928711
}
Since
2.2

◆ getPickedPointGPS

object getPickedPointGPS ( )
function

Get last picked point from measure handler (if active) as JS object, in GPS coordinates.

Example:

JSON.stringify( desiteAPI.getPickedPointGPS(), undefined, 2 );
{
"Lat": 51.424485207726626,
"Lon": 7.030167203128515
}
Since
2.2

◆ getPropertyValueFromVersionComparison

var getPropertyValueFromVersionComparison ( string   objectID,
string   propertyName,
string   propertyType,
bool  checkInheritance = true 
)
function

Get property value of an object in the Version Comparison module.

Parameters
objectIDID of object
propertyNameName of property
propertyTypeData type of property
checkInheritanceCheck inherited property values (default: true)
Since
3.1.1, 31 Oct 2022

◆ getResourcesTooltipsVisible

bool getResourcesTooltipsVisible ( )
function

Check if resources tooltip painter is activated.

Since
2.5.2, 22 aug 2018, sl

◆ getSelected

string getSelected ( string  domainFilter = "geometry")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get selected elements.

Parameters
domainFilterGet only visible of given domains
Returns
List of selected element IDs separated by ';'
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getSelectedElements() instead.

◆ getSelectedElements

array< string > getSelectedElements ( string  domainFilter = "geometry")
function

Get IDs of selected elements as list.

Parameters
domainFilterGet only selected of given domains
Returns
List of selected element IDs
Since
2.2.4, 06 Nov 2018

◆ getVersionComparisonOptions

object getVersionComparisonOptions ( )
function

Get current settings of the Version Comparison module.

Returns
object containing all options, for example
{
"checkActivePropertiesOnly": false,
"colorChangedObjects": "#0000ff",
"colorDeletedObjects": "#ff00ff",
"colorNewObjects": "#00ff00",
"compareVisibleObjectsOnly": true,
"ignoreCompositeIndex": true,
"ignoreComposites": true,
"ignoreFilename": true,
"ignoreMaterialID": true,
"ignoreMergedIDs": true,
"ignoreNamespace": true,
"ignoreOpenings": true,
"ignoreSurfacePartAreaList": true,
"tolerance": 0.0001
}
Parameters
toleranceis a value between 0.0 and 9.9999 (default: 0.0001)
Since
3.1.1, 31 Oct 2022

◆ getVersionComparisonResults

object getVersionComparisonResults ( array< string >   filterKeys)
function

Get results of the last Version Comparison, as a set of ID lists for new, removed, changed and unchanged Objects.
The results can be filtered to improve execution speed; please see example below.
This function will always succeed, but will return empty lists if no Version Comparison has been run.

Parameters
filterKeysKeys to filter the returned object by. Valid keys are "newObjects", "removedObjects", "changedObjects", "unchangedObjects".

Example for fetching new and deleted objects:

const versionCompResults = desiteAPI.getVersionComparisonResults(['newObjects', 'removedObjects']);
console.log(JSON.stringify(versionCompResults, 0, 4));

Output:

{
"newObjects": [
"0kc$E$0_LEKwaeVdLvFEDQ",
"3NhQFWrRL9UwnlkrC3ab8T",
...
],
"removedObjects": [
"2g7Li93IDC7AP$qEd1gAJn",
"08sWL6Vnb7PQvWxuK7OhIP",
...
]
}
Since
3.1.1, 28 Oct 2022

◆ getViewpointData

object getViewpointData ( string  vpID,
array< string >  filterKeys,
bool  whitelist = true 
)
function

Get Viewpoint data by a Viewpoint's ID.
An empty object will be returned if the ID is not found.

Note that a complete set of Viewpoint data can be very large, particularly if it has a preview image, redlining, and/or measure items. You should therefore restrict the output to the data that you actually want returned by passing a list of keys.
You can either pass a whitelist (containing keys you want reported back, default) or blacklist (containing keys to block).

Parameters
vpIDViewpoint ID
filterKeysKeys to filter the returned object by. See below example for valid keys.
whitelistIf true (default), the previous parameter is interpreted as a whitelist. Set to false for a blacklist.

Example for only fetching Name and Description:

var vpData = desiteAPI.getViewpointData('950a65f2-3590-48ca-9e7b-0409063116ce', ['name', 'description']);
console.log(JSON.stringify(vpData, 0, 4));

Output:

{
"description": "Lorem ipsum dolor sit amet",
"name": "API Demo"
}


Example for a full data set (not recommended unless you really need it all):

var vpData = desiteAPI.getViewpointData('950a65f2-3590-48ca-9e7b-0409063116ce', []);
console.log(JSON.stringify(vpData, 0, 4));

Output:

{
"ID": "950a65f2-3590-48ca-9e7b-0409063116ce",
"camera": {
"angle": 50,
"eye": {
"x": -0.9059411504323593,
"y": -1.3017791477128333,
"z": 5.848198052401477
},
"far": 30000,
"near": 0.3,
"orthoH": 10,
"poi": {
"x": 2.8941545486450195,
"y": 2.360422670841217,
"z": 2
},
"pro": 0,
"up": {
"x": 0,
"y": 0,
"z": 1
}
},
"clippingPlanes": [
{
"d": 2.666457985175375,
"enabled": true,
"nx": 1,
"ny": 0,
"nz": 0
},
{
"d": -5.244154930114746,
"enabled": false,
"nx": -1,
"ny": 0,
"nz": 0
},
...
{
"d": -4.5,
"enabled": false,
"nx": 0,
"ny": 0,
"nz": -1
}
],
"createdBy": "Username",
"createdOn": "2021-11-19T11:42:57.511Z",
"description": "Lorem ipsum dolor sit amet",
"elementStatus": {
"locked": [],
"selected": [],
"storeLocked": true,
"storeSelected": true,
"storeVisible": true,
"visible": [
"0wlYhvihf6g9XHFNvrNPYx",
"0wlYhvihf6g9XHFMrrNO_I",
...
"0wlYhvihf6g9XHFMrrNO$O"
]
},
"materialSchemaName": "",
"measureItems": {
"miPolygonList": [
{
"miPolygonIsTesselated": true,
"miPolygonPointList": [
{
"x": 2.7441541748046876,
"y": 2.9404228515625,
"z": 4
},
{
"x": 4.544154296875,
"y": 1.5404229125976565,
"z": 0
},
{
"x": 3.144154296875,
"y": 2.9404228515625,
"z": 0
}
]
}
]
},
"name": "API Demo",
"previewImage": "iVBORw0KGgoAAAANSUhEUgAAB4AAA ..."
"redlining": {
"rlitemlist": [
{
"draw": {
"pen": "00510040140000000000000101ffffffff0000000000003ff00000000000000000000000000000000000000000000000000000000000003ff00000000000000000000000000000000000000000000000000000000000003ff0000000000000400000000000000000000000000000000000000001",
"pointlist": [
{
"x": 412,
"y": 147
},
...
{
"x": 674,
"y": 999
}
]
}
}
],
"sh": 1395,
"sw": 858
},
"thumbnail": "iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAACXBIWXMAAA7EAAA ... ElFTkSuQmCC",
"updatedBy": "Username",
"updatedOn": "2021-11-19T12:27:25.083Z",
"wiremodeSchemaName": ""
}
Since
2.9.0, 19 Nov 2021

◆ getViewpointDataFromCurrentView

object getViewpointDataFromCurrentView ( array< string >  filterKeys,
bool  whitelist = true 
)
function

Get Viewpoint data from the current View.

See also
getViewpointData() for the format of the returned data.
Parameters
filterKeysKeys to filter the returned object by. See examples in the documentation for getViewpointData().
whitelistIf true (default), the previous parameter is interpreted as a whitelist. Set to false for a blacklist.
Since
2.9.0, 25 Nov 2021

◆ getVisible

string getVisible ( string  domainFilter = "geometry")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Get visible elements.

Parameters
domainFilterGet only visible of given domains
Returns
List of element IDs separated by ';'
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getVisibleElements() instead.

◆ getVisibleElements

array< string > getVisibleElements ( string  domainFilter = "geometry")
function

Get IDs of visible elements as list.

Parameters
domainFilterGet only visible of given domains
Returns
Array of visible element IDs
Since
2.2.4, 06 Nov 2018

◆ getVisualisationMode

int getVisualisationMode ( )
function
Since
1.5.0, 21 jul 2015, jh

◆ getVisualizationOptions

object getVisualizationOptions ( )
function

Get Visualization Options.

{
bgColor: [1, 1, 1],
decimalPlaces: 2, // for displayed coordinates, e.g. when using the measuring tools
drawBoundingBox: false,
drawGrid: true,
drawOverlayOrigin: false,
enableFastPaint: true,
gridDistanceBold: 10,
gridDistanceFine: 1,
lineStepFastPaint: 1,
showFramerate: false,
showSurveyPoint: true,
lockedSurveyPoint: false
}
Since
1.3.5, 22 Apr 2014
3.3.0, 13 Jun 2023 : removed walkSpeed, lineStep, drawNorthArrow, northArrowPos, northArrowRot, modelCoordinates, gpsLat and gpsLon
3.3.0, 26 Sep 2023 : added showSurveyPoint
3.3.0, 16 Oct 2023 : added lockedSurveyPoint

◆ getWebFormLocations

object getWebFormLocations ( )
function

Return an object containing all stored WebForm sources.
Keys:

  • default: Contains the full path to 'DbInputForm.html' in the current project directory, if found. If not found, the value will be empty.
  • projectBookmarkList: A list of WebForm bookmarks stored in the current project (if any). This list contains objects with keys name and url.
  • globalList: List of session global URLs that have been set by command line switch or config file.

Example:

{
"default": "Y:/D-41-TEST-PROJECTS/-001.06-2.6-CD-Test-IFC-BCF-PropTest/DbInputForm.html",
"globalList": [],
"projectBookmarkList": [{
"name": "CPT START",
"url": "https://office.ceapoint.com/CLOUD//Kd_CEAPOINT/index.html"
}]
}
Since
2.5.3, 03 Dec 2019

◆ hasSelected

bool hasSelected ( string  domainFilter = "all")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Check if the domain projects have selected elements.

Parameters
domainFilterCheck only given domains. Default is 'all' domains.
Since
1.5.0
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getSelectedElements() instead.

◆ hasVisible

bool hasVisible ( string  domainFilter = "all")
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Check if the domain projects have visible elements.

Parameters
domainFilterCheck only given domains. Default is 'all' domains.
Since
1.5.0
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use getVisibleElements() instead.

◆ hideAll

void hideAll ( bool  repaint,
string  domainCombination = "geometry" 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Hide all objects of domain (combinations allowed). Blocked objects are not included.

Parameters
repainttrue: Refresh 3D-view
Since
1.0.16
3.1.1, 31 Oct 2022 : deprecated
Deprecated:
Use setAllElementsVisible() instead:
desiteAPI.setAllElementsVisible(false, 'geometry');

◆ hideAllElements

void hideAllElements ( var   domains = var())
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Hide all elements of a list of domains.

Parameters
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';' [optional, default: geometry]
Since
3.1.1, 31 Oct 2022
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setAllElementsVisible() instead. For example:
desiteAPI.setAllElementsVisible(false, 'geometry');

◆ hideAllElementsInVersionComparison

void hideAllElementsInVersionComparison ( )
function

Hide all elements in Version Comparison.

Since
3.1.1, 31 Oct 2022

◆ hideDimensionsPainter

void hideDimensionsPainter ( )
function

Switch dimension painter off.

Since
1.4.8, 29 sep 2014, jh

◆ hideElements

void hideElements ( var   elementIDs,
bool  includeBlocked = false,
var   domains = var() 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Hide list of elements.

Parameters
elementIDsList of IDs to hide, either as an array or as a concatenated string, separated by ';'
includeBlockedHide objects even if they are blocked [optional]
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';' [optional, default: geometry]
Since
1.0.16
1.3.8 Added optional parameter 'includeBlocked'
2.9.3, 17 Mar 2022 : Input ID list can be either an array or a string of concatenated IDs
3.1.1, 31 Oct 2022 : Input domain list can be either an array or a string of concatenated identifiers
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setElementsVisible() instead:
desiteAPI.setElementsVisible(false, elementIDs);

◆ hideElementsInVersionComparison

void hideElementsInVersionComparison ( var   elementIDs)
function

Hide list of elements in Version Comparison.

Parameters
elementIDsList of IDs to hide, either as an array or as a concatenated string, separated by ';'
Since
3.1.1, 31 Oct 2022

◆ import3DModelIntoVersionComparison

var import3DModelIntoVersionComparison ( string   sourceFilePath,
string   referenceModelID 
)
function

Import a 3D model into Version Comparison.

Parameters
sourceFilePathInput file path for comparison
referenceModelIDReference to the original model (currently only used for import settings)
Returns
result with error code 0 on success or > 0 on failure.
{
"code": 0,
"message": "OK"
}

Example:

let referenceModelID = "a70cdc70-150c-44c1-bf76-ad05547ce897";
let result = desiteAPI.import3DModelIntoVersionComparison("C:/model.ifc", referenceModelID);
Since
3.3.0, 17 Oct 2023

◆ import3DModels

array< object > import3DModels ( var   sourceFilePaths,
var   options 
)
function

Import a single or multiple 3D models into the current project. This will only work for DESITE products that support imports (e.g. MD, MD PRO, but not CUSTOM).
Note that location options will only be applied when no project location has already been set. To change an already defined project location, use setLocation().

Parameters
sourceFilePathsArray of input file paths.
optionsOptions for model import.
Example / Default Settings:
{
"location":
{
"coordinateReferenceSystem": "Custom", // Type can be 'Custom', 'UTM' or 'GaussKruger'
"coordinateReferenceSystemName": "", // This parameter is only relevant when 'Custom' as coordinate reference system is used
"zone": "" // This parameter is only relevant when 'UTM' or 'GaussKruger' as coordinate reference system is used
},
"locationFileIndex": 0 // Index of the file that should be used to set the project's reference location from
}
Returns
List of results with error code 0 on success or > 0 on failure.
[
{
"error":
{
"code": 0,
"message": "OK"
},
"filename": "C:/model.ifc",
"model": "8636a906-8b67-4a7a-9765-63105aa8caec"
},
...
]

Example #1:

let result = desiteAPI.import3DModels("C:/model.ifc", {}); // Use default values for options, see above

Example #2:

let result = desiteAPI.import3DModels(["C:/model.ifc"],
{
"location":
{
"coordinateReferenceSystem": "GaussKruger",
"zone": "2"
},
"locationFileIndex": 0
});

Example #3:

let result = desiteAPI.import3DModels(["C:/model.ifc", "C:/cube.fbx"],
{
"location":
{
"coordinateReferenceSystem": "Custom",
"coordinateReferenceSystemName": "My Location"
},
"locationFileIndex": 1 // Use the position of cube.fbx as the project's reference location
});
Since
3.3.0, 19 Sep 2023

◆ importBCF

var importBCF ( string  sourceFilePath)
function

Import a BCF file.

Parameters
sourceFilePathSource BCF file
Returns
report object with error code 0 on success or > 0 on failure.
{
"error":
{
"code": 0,
"message": "OK"
},
"newIssues": [
"1b61734b-45a2-439f-932d-00c2673a51cc",
"c22fcd39-5c48-4772-baa4-3032292ee804"
],
"newSingleViewpoints": [
"e45f687c-831c-46a7-9113-e346cd238051"
],
"updatedIssues": [],
"updatedSingleViewpoints": []
}
Since
2.5.2, 01 Aug 2019
2.9.2, 11 Feb 2022 : changed return value from bool to report object
3.1.0 : changed error handling

◆ importBillsOfQuantities

array< object > importBillsOfQuantities ( var   sourceFilePaths)
function

Import a single or multiple bills of quantities into the current project.
This will only work for DESITE products that support imports (e.g. MD, MD PRO, but not CUSTOM).

Returns
List of results with error code 0 on success or > 0 on failure.
[
{
"error":
{
"code": 0,
"message": "OK"
},
"filename": "C:/boq.x81",
"model": "8636a906-8b67-4a7a-9765-63105aa8caec"
},
...
]

Example:

let result = desiteAPI.importBillsOfQuantities("C:/boq.x81");
Since
3.3.0, 19 Sep 2023

◆ importCheckRuns

var importCheckRuns ( var   sourceFilePaths)
function

Import Model Check Runs file(s).

Parameters
sourceFilePathsSingle or multiple filenames to be imported.
Returns
List of results with error code 0 on success or > 0 on failure.

Example:

var ret = desiteAPI.importCheckRuns('C:\\Temp\\test.qa.xml');
JSON.stringify(ret, 0, 4);
[
{
"error": {
"code": 0,
"message": "OK"
},
"filename": "C:\\Temp\\test.qa.xml"
},
...
]
Since
3.1.1, 16 Sep 2022
3.2.1, 17 Jan 2023 : Added support for multiple input files; return format aligned with importModel()

◆ importTimeSchedules

array< object > importTimeSchedules ( var   sourceFilePaths)
function

Import a single or multiple time schedules into the current project.
This will only work for DESITE products that support imports (e.g. MD, MD PRO, but not CUSTOM).

Returns
List of results with error code 0 on success or > 0 on failure.
[
{
"error":
{
"code": 0,
"message": "OK"
},
"filename": "C:/schedule.mpp",
"model": "8636a906-8b67-4a7a-9765-63105aa8caec"
},
...
]

Example:

let result = desiteAPI.importTimeSchedules("C:/schedule.mpp");
Since
3.3.0, 19 Sep 2023

◆ message

int message ( string  )
function

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'.

Example:
show a message in a message window:

desiteAPI.message( "<cmdMessage><![CDATA[<font size=\"+2\" color=\"#ffffff\">Nur ein Objekt selektieren!</font>]]></cmdMessage>");
Since
1.0.18, 15 aug 2012, jh

◆ moveToLocationGps

void moveToLocationGps ( double  lat,
double  lon 
)
function

Move camera in 3d view to location given by GPS coordinates (decimal degrees).

Since
2.0.19, 03 mar 2018, jh

◆ openLink

void openLink ( string  url,
bool  useDesktopService 
)
function

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.thinkproject.com', true );
Since
1.3.1, 27 feb 2014, jh

◆ openProject

void openProject ( string  url,
bool  useSessionData = false 
)
function

Open project in this instance.

Parameters
useSessionDataNo longer used; no effect.
Since
1.3.3, 02 Apr 2014

◆ redirectDocument

int redirectDocument ( string  modelId,
string  newSourceFilePath 
)
function

Redirect a model source file to a new local path.
Note that the source redirection will have no immediate effect. The project must be saved and reopened to trigger a model update from the new location.

Parameters
newSourceFilePathPath and file name of the new model source
Returns
Error Code:
1 - OK
0 - Undefined
-1 - Error : No model with given ID found.
-2 - Error: New source file not found or not accessible.
-3 - Error: The new source file is not of the same data format
Since
2.7.1, 23 Nov 2020

◆ removeFromViewPoint

void removeFromViewPoint ( string  vpID,
string  objIdList 
)
function

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

Since
2.0.16, 04 Sep 2017

◆ removeWebFormBookmark

int removeWebFormBookmark ( string  url)
function

Remove a WebForm bookmark by URL.

Returns
1 Bookmark removed
-1 Bookmark not found.
Since
2.5.3, 03 Dec 2019

◆ runVersionComparison

bool runVersionComparison ( )
function

Run Version Comparison.
Prior setup can be done by importModelIntoVersionComparison() and setVersionComparisonOptions().
Results can be fetched by getVersionComparisonResults().

Returns
true if comparison run was successful (at least one model must have been loaded), false else
Since
3.1.1, 31 Oct 2022

◆ saveCurrentViewToFile

bool saveCurrentViewToFile ( string  filename,
int  width = 1920,
int  height = 1080 
)
function

Save the current view to a file. The format is specified by the extension of the filename.
Supported formats are *.jpg, *.png

Prior to DESITE version 3.0, the size of the resulting image was determined by the current viewport size.
The new default size is Full HD, which you can change by passing width and height parameters.

Example:

var s = desiteAPI.saveCurrentViewToFile('C:/tmp/abc.jpg');
// if s = false, picture could not be saved
Since
12 Aug 2016
2.9.0, 25 Nov 2021 : added optional parameters width and height

◆ saveProject

int saveProject ( )
function

Save current project.

Returns
1 OK
-1 Project was not saved correctly (errors or process aborted)
Since
2.1.0, 16 May 2017

◆ saveProjectArchive

int saveProjectArchive ( string  filename,
string  packBookmark 
)
function

Write CP Archive to 'cpzip_filename'. A missing suffix (*.cpzip) will be appended. Note: The 'cpzip' format has no 2 GB barrier.

Parameters
filenameFilename of archive with complete path. If no absolute path is given the archive is written to the parent directory of the project directory.
packBookmarkName of bookmark to apply. If the bookmark does not exist, the default file list is used for creating the archive.
Returns
Error Code:
1 - OK
-1 - Error : Internal error.
-2 - Error: Project directory is empty. Project must be saved first.
Since
3.0.0, 11 oct 2021, sl

◆ selectElements

void selectElements ( string  idList,
bool  flag,
string  domainCombination = "geometry" 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Select objects given by IDs.

Parameters
idListString of object IDs separated by ';'.
flagtrue = select, false = unselect elements
Since
1.0.16
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setElementsSelected() instead.

◆ selectVisible

void selectVisible ( )
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Select visible 3D objects and generic elements. 3D-view is refreshed afterwards.

Since
1.0.16
3.2.2, 14 Mar 2023 : deprecated
Deprecated:
Use getVisibleElements() and setElementsSelected() instead.

◆ selectVisibleGeometric

void selectVisibleGeometric ( )
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Select visible 3D objects. 3D-view is refreshed afterwards.

Since
1.0.17, 01 Jul 2012
3.2.2, 14 Mar 2023 : deprecated
Deprecated:
Use getVisibleElements() and setElementsSelected() instead. In between, apply filters as needed.

◆ sendRemoteMessage

bool sendRemoteMessage ( string  message)
function

Send a message to the Remote client socket (by default localhost:45455; for more info on the Remote interface, see documentation).
The message does not need to follow any particular format or convention.
Note that, since the Remote socket communication is connectionless, there is no way of checking if anyone actually received the message.

Returns
false if Remote was not initialized correctly, else true.
Since
2.5.2, 2019-08-13, ah

◆ set4dDateTime

bool set4dDateTime ( date  dt)
function

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

◆ set4dIsActive

void set4dIsActive ( bool  active)
function

Activate/Deactivate 4D-Simulation.

Since
1.5.0, 14 Oct 2015

◆ set4dOptions

void set4dOptions ( object  opt)
function

Set 4D options.

See also
get4dOptions()
Since
1.5.0, 14 Oct 2015

◆ setAllElementsSelected

void setAllElementsSelected ( bool  selected,
var   domains 
)
function

Select or deselect all elements of a list of domains.

Parameters
selectedDetermines whether all elements should be selected (true) or deselected (false)
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';'
Since
3.3.0, 16 Mar 2023

◆ setAllElementsVisible

void setAllElementsVisible ( bool  visible,
var   domains 
)
function

Show or hide all elements of a list of domains.

Parameters
visibleDetermines whether all elements should be visible (true) or invisible (false)
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';'
Since
3.3.0, 16 Mar 2023

◆ setBsPlanUnderlayActive

void setBsPlanUnderlayActive ( bool  active)
function

Draw plan underlay of building structure. Activate drawing of plan underlay. The plan underlay is drawn for visible building structure items.

The plan underlay must be created from linked 3d-objects first.

Parameters
activetrue: activate, false: deactivate
Since
2.0, jh

◆ setDocumentsTooltipsVisible

void setDocumentsTooltipsVisible ( bool  v)
function

Switch documents tooltip painter on/off.

◆ setElementsSelected

void setElementsSelected ( bool  selected,
var   elementIDs 
)
function

Select or deselect a list of elements.

Parameters
selectedDetermines whether the given elements should be selected (true) or deselected (false)
elementIDsList of Element IDs, either as an array or as a concatenated string, separated by ';'
Since
3.3.0, 16 Mar 2023

◆ setElementsVisible

void setElementsVisible ( bool  visible,
var   elementIDs 
)
function

Show or hide a list of elements.

Parameters
visibleDetermines whether the given elements should be visible (true) or invisible (false)
elementIDsList of Element IDs, either as an array or as a concatenated string, separated by ';'
Since
3.3.0, 16 Mar 2023

◆ setHandlerMode

bool setHandlerMode ( object  handlerInfo)
function

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', 'cutting', 'pin', 'redline', 'clipping'
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', 'distance'
}

Cutting Handler

var handlerInfo = {
type: 'cutting',
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,
scaleX: 0.5 // scale of object
}

Redlining Handler

var handlerInfo = {
type: 'redline',
mode: 'rect', // one of 'rect', 'oval', 'text', 'freehand', 'arrow', 'erase'
penWidth: 5, // should be 1, 5 or 10
penColor: 'red', // one of 'red', 'green', 'blue' or hex-coded RGB color value
brushColor: '#FFFF00' // one of 'red', 'green', 'blue' or hex-coded RGB color value
}

Clipping Handler

var handlerInfo = {
type: 'clipping',
drawEdges: true,
drawFaces: true,
edgeColor: '#FFAA00FF', // hex-coded RGB(A) color value
edgeWidth: 2, // 1-9
fillColor: '#647882FF', // hex-coded RGB(A) color value
fillColorMode: 1, // 1 = user defined color, 2 = object color
fillOpaqueOnly: true
}
Since
1.9.0, 01 Jul 2017
2.8.2, 14 Apr 2021 : added missing 'walk' handler and mode 'distances' to measure handler
2.8.5, 03 Dec 2021 : added missing 'clipping' handler

◆ setImportSettings

void setImportSettings ( var   settings)
function

Set project's import settings per format.

Use getImportSettings() for a list of all parameters.

Example #1:

desiteAPI.setImportSettings({ general: { placement: "Local" } });

Example #2:

desiteAPI.setImportSettings({ general: { placement: "LocalCenter" }, ifc: { keepEmptyProperties: true } });
Since
3.3.0, 28 Aug 2023

◆ setLocation

void setLocation ( var   location)
function

Set Location parameters, e.g. the survey point.

See getLocation() for a list of all parameters.

Example #1:

desiteAPI.setLocation({ surveyPoint: { x: 5.0, y: 10.0, z: 20.0 });

Example #2:

let result = desiteAPI.convertCoordinates({ position: { latitude: 51.124213, longitude: 6.855469 }, from: "GPS", to: "UTM" });
desiteAPI.setLocation({ coordinateReferenceSystem: "UTM", easting: result.position.x, northing: result.position.y, zone: result.zone });
Since
3.3.0, 13 Jun 2023

◆ setPainterOptions

void setPainterOptions ( object  opt)
function

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

◆ setResourcesTooltipsVisible

void setResourcesTooltipsVisible ( bool  v)
function

Switch resources tooltip painter on/off.

Since
2.5.2, 22 aug 2018, sl

◆ setVersionComparisonOptions

bool setVersionComparisonOptions ( object   options)
function

Set options used by Version Comparison.

Parameters
optionsOptions passed as object.
Returns
true if at least one option was changed, else false.
See also
getVersionComparisonOptions() for a full listing of available options.
Since
3.1.1, 31 Oct 2022

◆ setViewpointData

bool setViewpointData ( string  viewpointID,
object  data 
)
function

Set data to a Viewpoint identified by ID. The Viewpoint must already exist.

Returns
true if the Viewpoint was modified, else false.
See also
getViewpointData() for the expected format of the data object.
Since
2.9.0, 10 Jan 2022

◆ setViewpointDataToCurrentView

void setViewpointDataToCurrentView ( object  data)
function

Apply Viewpoint data to the current 3D View. No data is stored.

See also
getViewpointData() for the expected format of the data object.
Since
2.9.0, 21 Nov 2021

◆ setVisualisationMode

void setVisualisationMode ( int  mode,
bool  repaint = true 
)
function

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

◆ setVisualizationOptions

void setVisualizationOptions ( object  opt)
function

Set Visualization Options

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

Example:

desiteAPI.setVisualizationOptions({ drawGrid: true, gridDistanceFine: 2.0, gridDistanceBold: 5.0 });
Since
1.3.5, 22 Apr 2014
3.3.0, 13 Jun 2023 : removed walkSpeed, lineStep, drawNorthArrow, northArrowPos, northArrowRot, modelCoordinates, gpsLat and gpsLon
3.3.0, 26 Sep 2023 : added showSurveyPoint
3.3.0, 16 Oct 2023 : added lockedSurveyPoint

◆ showAll

void showAll ( bool  repaint,
string  domainCombination = "geometry" 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Show all objects of domain (combinations allowed).

Parameters
repainttrue: Refresh 3D-view
Since
1.0.16
3.1.1, 31 Oct 2022 : deprecated
Deprecated:
Use setAllElementsVisible() instead.

◆ showAllElements

void showAllElements ( var   domains = var())
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Show all elements of a list of domains.

Parameters
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';' [optional, default: geometry]
Since
3.1.1, 31 Oct 2022
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setAllElementsVisible() instead.

◆ showAllElementsInVersionComparison

void showAllElementsInVersionComparison ( )
function

Show all elements in Version Comparison.

Since
3.1.1, 31 Oct 2022

◆ showClashList

void showClashList ( string  clashIdList)
function

Show conflicted objects of given clashes.

Since
1.9.0, 04 Aug 2016

◆ showDimensionsPainter

void showDimensionsPainter ( bool  showAABB,
bool  showOOBB 
)
function

Switch dimension painter on. Show dimensions of selected objects.

Parameters
showAABBShow dimensions of axis aligned bounding box of selected objects
showOOBBShow dimensions of optimized, orientated bounding box of selected objects
Since
1.4.8, 29 sep 2014, jh

◆ showElements

void showElements ( var   elementIDs,
bool  includeBlocked = false,
var   domains = var() 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Show list of elements.

Parameters
elementIDsList of IDs to show, either as an array or as a concatenated string, separated by ';'
includeBlockedShow objects even if they are blocked [optional]
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';' [optional, default: geometry]
Since
1.0.16
1.3.8 : Added optional parameter 'includeBlocked'
2.9.3, 17 Mar 2022 : Input ID list can be either an array or a string of concatenated IDs
3.1.1, 31 Oct 2022 : Input domain list can be either an array or a string of concatenated identifiers
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setElementsVisible() instead.

◆ showElementsInVersionComparison

void showElementsInVersionComparison ( var   elementIDs)
function

Show list of elements in Version Comparison.

Parameters
elementIDsList of IDs to show, either as an array or as a concatenated string, separated by ';'
Since
3.1.1, 31 Oct 2022

◆ showElementsOnly

void showElementsOnly ( var   elementIDs,
var   domains = var() 
)
function
Deprecated:
This method will be removed in future versions of DESITE and should not be used for new scripts anymore.

Show list of elements exclusively (hide all others).

Parameters
elementIDsList of IDs to show, either as an array or as a concatenated string, separated by ';'
domainsList of domain identifiers, either as an array or as a concatenated string, separated by ';' [optional, default: geometry]
Since
1.3.5, 19 Apr 2014
2.9.3, 17 Mar 2022 : Input ID list can be either an array or a string of concatenated IDs
3.1.1, 31 Oct 2022 : Input domain list can be either an array or a string of concatenated identifiers
3.3.0, 16 Mar 2023 : deprecated
Deprecated:
Use setAllElementsVisible() and setElementsVisible() instead. For example:
desiteAPI.setAllElementsVisible(false, 'geometry');
desiteAPI.setElementsVisible(true, elementIDs);

◆ showElementsOOBBFront

object showElementsOOBBFront ( string  idList,
double  prec = 1.e-2 
)
function

Show objects from front or back, determined by current camera position and by width and height of Optimized Bounding Box of objects.

Parameters
IDListString with object IDs, separated by ';'.
Returns
Temporarily calculated Optimized Bounding Box as JSON-Object.
See also
showElementsOOBBSide(string, double)
Since
1.4.8, 29 sep 2014, jh

◆ showElementsOOBBSide

object showElementsOOBBSide ( string  IDList,
double  prec = 1.e-2 
)
function

Show objects from left or right side, determined by camera current position and by length and height of Optimized Bounding Box of objects.

Parameters
IDListString with object IDs, separated by ';'.
Returns
Temporarily calculated Optimized Bounding Box as JSON-Object.
{
Height: 2.45,
Width: 1.23,
Length: 4.56
}
Since
1.4.8, 29 sep 2014, jh

◆ showElementsOOBBTop

object showElementsOOBBTop ( string  IDList,
double  prec = 1.e-2 
)
function

Show objects from top or bottom, determined by current camera position and by length and width of Optimized Bounding Box of objects.

Parameters
IDListString with object IDs, separated by ';'.
Returns
Temporarily calculated Optimized Bounding Box as JSON-Object.
See also
showElementsOOBBSide(string, double)
Since
1.4.8, 29 sep 2014, jh

◆ showHomeView

void showHomeView ( )
function

Activates the home viewpoint of the current project.
If no home viewpoint is configured, the camera is set to an isometric view that shows all geometric elements.
This behavior is analogous to pressing the "home" button on the GUI.

Since
2.9.2, 04 Mar 2022

◆ showOnScreenKeyboard

void showOnScreenKeyboard ( )
function

Open keyboard.

Since
1.9.0, 27 may 2016, jh
Remarks
update 2.0.9, 16. jan 2017, ar, for Windows10

◆ showOpenFileDialog

string showOpenFileDialog ( string  caption = "",
string  directory = "",
string  filter = "" 
)
function

Show an "Open File" dialog to choose the path and name of a file.

Parameters
captionTitle of the dialog (default 'Open File')
directoryDirectory which is initially displayed
filterFile filter (default 'All files (*.*)'). Format example:
"JPEG (*.jpg *.jpeg);; TIFF (*.tif);; All files (*.*)"

You could also use a standard HTML input, for example:

<input type="file" onchange="alert(window.webkitURL.createObjectURL(this.files[0]))">

An Object URL created like this represents the specified file object and can be used to access the file, but for security reasons, it will never reveal the actual file's path.
If you need the unencrypted path, use this function instead.

Returns
Path of the file that got selected in the Dialog.
Since
2.2.4, 16 oct 2018, th
Remarks
updated on 08 nov 2018, sl: added optional parameters

◆ showSaveFileDialog

string showSaveFileDialog ( string  caption = "",
string  directory = "",
string  filter = "" 
)
function

Show a "Save File" dialog to choose the path and name of a file to save to.

Parameters
captionTitle of the dialog (default 'Save File')
directoryDirectory which is initially displayed
filterFile filter (default 'All files (*.*)'). Format example:
"JPEG (*.jpg *.jpeg);; TIFF (*.tif);; All files (*.*)"
Returns
Path and name of the file given by the user.
Since
2.5.4, 2020-02-03, ah

◆ showViewpointByID

int showViewpointByID ( string  id)
function

Show a viewpoint by ID.

Returns
1 : ok
-1 : viewpoint 'id' could not be found
Since
1.3.5

◆ startEXE

void startEXE ( string  prg,
string  args 
)
function

Start program

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

Since
1.0.17, 18 jul 2012, jh

◆ zoomToAllDocuments

void zoomToAllDocuments ( )
function

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

Since
1.9.0, 09 apr 2016, jh

◆ zoomToAllResources

void zoomToAllResources ( )
function

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

Since
1.9.0, 09 apr 2016, jh

◆ zoomToDocuments

void zoomToDocuments ( array< string >  idList)
function

Zoom to given documents in 3D view.

Parameters
idListArray of IDs.
Since
1.9.0, 09 apr 2016, jh

◆ zoomToLocationGK

void zoomToLocationGK ( double  rw,
double  hw,
double  h 
)
function

Zoom to location given by Gauss-Krueger coordinates.

Since
2.0.19, 03 mar 2018, jh

◆ zoomToLocationGps

void zoomToLocationGps ( double  lat,
double  lon 
)
function

Zoom to location given by GPS coordinates (decimal degrees).

Since
2.0.19, 03 mar 2018, jh

◆ zoomToObjects

void zoomToObjects ( string  objIDs)
function

Zoom to given 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.

Parameters
objIdsString holding the object IDs, separated by ';'.
Since
1.9.0, 09 may 2016, jh

◆ zoomTopView

void zoomTopView ( )
function

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

Since
1.0.16

◆ zoomToResources

void zoomToResources ( array< string >  idList)
function

Zoom to resources in 3D view. The resources are given by an ID list.

Since
1.9.0, 09 apr 2016, jh

◆ zoomToSelected

void zoomToSelected ( )
function

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

◆ zoomToSelectedDocuments

void zoomToSelectedDocuments ( )
function

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

Since
1.9.0, 09 apr 2016, jh

◆ zoomToSelectedResources

void zoomToSelectedResources ( )
function

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

Since
1.9.0, 09 apr 2016, jh

◆ zoomToVisible

void zoomToVisible ( )
function

Zoom to visible 3D-objects.

The view is adjusted in such a way that all visible 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

◆ zoomToVisibleDocuments

void zoomToVisibleDocuments ( )
function

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

Since
1.9.0, 09 apr 2016, jh

◆ zoomToVisibleResources

void zoomToVisibleResources ( )
function
Since
1.9.0, 09 apr 2016, jh

Created: Wed Oct 30 2024 09:33:04