FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::Layers Namespace Reference

Classes

struct  LayerData
 

Typedefs

using LayerList = 1::vector< LayerData >
 
using LayerSet = 1::set< LayerData >
 

Functions

FORMIT_CORE_EXPORT::vector< size_t > GetAllLayers ()
 Gets all layer id's. More...
 
FORMIT_CORE_EXPORT bool GetLayerData (size_t layerID, LayerData &data)
 Get the layer's name and visibility. More...
 
FORMIT_CORE_EXPORT bool IsValid (size_t layerID)
 Check whether the layer with the given id exists. More...
 
FORMIT_CORE_EXPORT void SetLayersVisibility (const 1::vector< FormIt::Layers::LayerData > &aLayersVisbility)
 Set the visibility of a list of layers. More...
 
FORMIT_CORE_EXPORT bool SetLayerVisibility (1::string const &layerName, bool visibility)
 Set the visibility of a layer by name. More...
 
FORMIT_CORE_EXPORT bool LayerExists (1::string const &layerName)
 Check whether a layer with that name already exists. More...
 
FORMIT_CORE_EXPORT::pair< bool, 1::string > AddLayer (size_t nHistoryId, 1::string const &layerName, bool visible)
 Add a layer with the given name and visibility. More...
 
FORMIT_CORE_EXPORT void DeleteLayers (const 1::vector< size_t > &aLayerIDs)
 Delete layers. More...
 
FORMIT_CORE_EXPORT bool SetLayerName (size_t layerID, 1::string const &newLayerName)
 Renames a layer. More...
 
FORMIT_CORE_EXPORT bool AssignLayerToObjects (1::string const &newLayerName, const 1::vector< WSM::GroupInstancePath > &aObjects)
 Assigns the layer with the given name to the list of objects. The layer should already exist. More...
 
FORMIT_CORE_EXPORT bool AssignLayerToObjects (size_t layerID, const 1::vector< WSM::GroupInstancePath > &aObjects)
 Assigns the layer to the list of objects. More...
 
FORMIT_CORE_EXPORT void RemoveLayersFromObjects (const 1::vector< size_t > &layerIDs, const 1::vector< WSM::GroupInstancePath > &aObjectPaths)
 Removes any of layers in the vector from the list of objects. More...
 
FORMIT_CORE_EXPORT::vector< WSM::GroupInstancePathGetAllObjectsOnLayers (const 1::vector< size_t > &aLayerIDs, bool allHistories=true)
 Collects all objects which are on the given layers. More...
 
FORMIT_CORE_EXPORT bool ChangeLayerOrder (size_t layerID, size_t newPosition)
 Give the layer a new position in the list. More...
 
FORMIT_CORE_EXPORT LayerList GetLayerList ()
 Get the list of layers defined in the layer manager. More...
 
FORMIT_CORE_EXPORT LayerSet GetObjectsLayerList (1::vector< WSM::GroupInstancePath > const &aObjects, bool bIncludeNoLayer=false)
 Get the set of layers the given Objects are on. More...
 
FORMIT_CORE_EXPORT void SetLayerList (const LayerList &layerList)
 Set the list of layers in the manager. More...
 
FORMIT_CORE_EXPORT bool IsValidObjectForLayerAssignment (size_t nHistoryId, size_t objectId)
 Checks whether an object is valid for being assigned a layer attribute. More...
 
FORMIT_CORE_EXPORT size_t GetObjectLayerID (size_t nHistoryID, size_t nObjectID)
 Gets the formit layer id for the object. More...
 
FORMIT_CORE_EXPORT::pair< bool, 1::string > GetNewLayerName (1::string const &newNamePrefix)
 GetNewLayerName generates a new unique layer name with newNamePrefix as a prefix. More...
 
FORMIT_CORE_EXPORT void RenameLayer (LayerList &layerList, 1::string const &oldName, 1::string const &newName)
 Replace the name of the layer in the layer list, which has the name "oldlName" with "newName". More...
 
FORMIT_CORE_EXPORT bool IsValidLayerName (size_t aLayerId, const 1::string &newLayerName, 1::string &errorMsg)
 Check if the given name is valid for a layer. More...
 
FORMIT_CORE_EXPORT size_t GetLayerID (const 1::string &layerName)
 Returns the formit layer id from the name. More...
 
FORMIT_CORE_EXPORT bool SetLayerPickable (size_t layerId, bool pickable)
 Set the pickable status of a layer. More...
 
FORMIT_CORE_EXPORT bool SetLoadInRevit (size_t layerId, bool bLoad)
 Set the load in Revit flag of a layer. More...
 
FORMIT_CORE_EXPORT bool IsSectionPlaneOrIndicatorLayer (size_t layerId)
 Check whether the layer is either a section indicator or section plane layer. More...
 
FORMIT_CORE_EXPORT size_t CountObjectsOnLayer (const 1::vector< WSM::GroupInstancePath > &objectPaths, size_t layerId)
 Returns how many of the objects in objectPaths, or their owners are on the given layer If layerId is passed as WSM::INVALID_ID, it counts how many objects are not on any layer. More...
 

Typedef Documentation

using FormIt::Layers::LayerList = typedef 1::vector<LayerData>
using FormIt::Layers::LayerSet = typedef 1::set<LayerData>