Archicad 29 C++ API
Loading...
Searching...
No Matches
ACAPI::Element::Opening Class Referencefinal

#include <Opening.hpp>

Inheritance diagram for ACAPI::Element::Opening:
ACAPI::ElementBase ACAPI::Object

Classes

class  Modifier
 

Public Member Functions

bool Exists () const
 
OpeningFloorPlanParameters GetFloorPlanParameters () const
 
OpeningExtrusionParameters GetExtrusionParameters () const
 
OpeningGeometry GetOpeningGeometry () const
 
Result< UniqueIDGetParentElement () const
 
std::vector< UniqueIDGetCutElements () const
 
template<typename ModifierFunc >
Result< void > Modify (const ModifierFunc &modifierFunc, const GS::UniString &undoString)
 Executes the passed modifier scope in an Undoable command.
 
- Public Member Functions inherited from ACAPI::ElementBase
UniqueID GetElemId () const
 Get unique identifier of the ElementBase object.
 
Result< void > IsEditable () const
 Checks whether the element is editable.
 
- Public Member Functions inherited from ACAPI::Object
 Object (std::shared_ptr< Impl::ObjectImpl > impl)
 Constructs a new object.
 
const API_TokenGetToken () const
 Get the token for this object.
 

Static Public Member Functions

static Result< OpeningGet (const UniqueID &uniqueId)
 Returns an Opening.
 
static Result< std::vector< UniqueID > > GetConnectedOpenings (const UniqueID &uniqueId, const API_Token &token)
 Returns all Openings connected to the specified element.
 

Protected Member Functions

 Opening (std::shared_ptr< Impl::OpeningImpl > impl)
 Constructs an Opening with an opening implementation.
 
- Protected Member Functions inherited from ACAPI::ElementBase
 ElementBase (std::shared_ptr< Impl::ObjectImpl > impl)
 Constructs a new ElementBase.
 
- Protected Member Functions inherited from ACAPI::Object
 ~Object ()
 Default destructor.
 

Additional Inherited Members

- Protected Attributes inherited from ACAPI::Object
std::shared_ptr< Impl::ObjectImplmImpl
 Impl object given by constructor.
 

Detailed Description

It is a representation of Opening element.

Since
Archicad 29

Constructor & Destructor Documentation

◆ Opening()

ACAPI::Element::Opening::Opening ( std::shared_ptr< Impl::OpeningImpl > impl)
protected

Constructs an Opening with an opening implementation.

Parameters
implThe opening implementation.

Member Function Documentation

◆ Exists()

bool ACAPI::Element::Opening::Exists ( ) const
Returns
Checks if the element still exists.

◆ Get()

static Result< Opening > ACAPI::Element::Opening::Get ( const UniqueID & uniqueId)
static

Returns an Opening.

Parameters
uniqueIdThe UniqueID of the requested Opening.
Returns
If the uniqueId belongs to an Opening, returns the object associated to it, otherwise Error.

◆ GetConnectedOpenings()

static Result< std::vector< UniqueID > > ACAPI::Element::Opening::GetConnectedOpenings ( const UniqueID & uniqueId,
const API_Token & token )
static

Returns all Openings connected to the specified element.

Parameters
uniqueIdThe ID of the element whose connected openings you wish to query.
tokenThe token used by the implementation.
Returns
Return the IDs of Openings that cut the element specified in the uniqueId, or returns error:
  • if the ID points to a non-existing element;
  • if element's type specified by the ID can't be cut by Opening.

◆ GetCutElements()

std::vector< UniqueID > ACAPI::Element::Opening::GetCutElements ( ) const
Returns
Returns the IDs of elements cut by the Opening. Parent element's ID will be included in the list as well.

◆ GetExtrusionParameters()

OpeningExtrusionParameters ACAPI::Element::Opening::GetExtrusionParameters ( ) const
Returns
Returns the extrusion parameters of the opening.

◆ GetFloorPlanParameters()

OpeningFloorPlanParameters ACAPI::Element::Opening::GetFloorPlanParameters ( ) const
Returns
Returns the floorplan parameters of the opening.

◆ GetOpeningGeometry()

OpeningGeometry ACAPI::Element::Opening::GetOpeningGeometry ( ) const
Returns
Returns the extrusion geometry of the opening.

◆ GetParentElement()

Result< UniqueID > ACAPI::Element::Opening::GetParentElement ( ) const
Returns
Returns the ID of the opening's parent element if it has any, otherwise Error.

◆ Modify()

template<typename ModifierFunc >
Result< void > ACAPI::Element::Opening::Modify ( const ModifierFunc & modifierFunc,
const GS::UniString & undoString )

Executes the passed modifier scope in an Undoable command.

Parameters
modifierFuncThe modifier scope (lambda, std::function or function pointer) the caller wants to execute.
undoStringThe text which appears in the undo queue of Archicad after executing the command.
Returns
Returns an error if the process of modification fails for some reason, otherwise nothing.