Archicad 29 C++ API
Loading...
Searching...
No Matches
ACAPI::Keynote::KeynoteManager Class Reference

A class that contains keynote related functions. More...

#include <KeynoteManager.hpp>

Inheritance diagram for ACAPI::Keynote::KeynoteManager:
ACAPI::Object

Public Types

enum class  AutoTextTokenSelector { Key , Title , Description , Reference }
 Part of the keynote, an autotext should refer to.
 

Public Member Functions

Result< KeynoteFolderGetRootFolder () const
 
Result< GS::UniString > GetAutoTextTokenFor (const API_Guid &keynoteItemId, AutoTextTokenSelector tokenSelector) const
 
- 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.
 

Friends

Result< KeynoteManagerCreateKeynoteManager ()
 A function to create keynote manager instance, that lets you query and manipulate keynote related data.
 

Additional Inherited Members

- Protected Member Functions inherited from ACAPI::Object
 ~Object ()
 Default destructor.
 
- Protected Attributes inherited from ACAPI::Object
std::shared_ptr< Impl::ObjectImplmImpl
 Impl object given by constructor.
 

Detailed Description

A class that contains keynote related functions.

Since
Archicad 28

Member Function Documentation

◆ GetAutoTextTokenFor()

Result< GS::UniString > ACAPI::Keynote::KeynoteManager::GetAutoTextTokenFor ( const API_Guid & keynoteItemId,
AutoTextTokenSelector tokenSelector ) const
Returns
Token, that an autotext label can interpret as a field of the given keynote.
Parameters
keynoteItemIdThe ID of the referred keynote item.
tokenSelectorThe selector specifies, which part of the keynote item should be referred.
Example code snippets from Test / Keynote
GS::UniString textContent;
textContent += manager.Unwrap ().GetAutoTextTokenFor (keynoteItem.GetId (), ACAPI::Keynote::KeynoteManager::AutoTextTokenSelector::Key).Unwrap () + "\n";
textContent += manager.Unwrap ().GetAutoTextTokenFor (keynoteItem.GetId (), ACAPI::Keynote::KeynoteManager::AutoTextTokenSelector::Title).Unwrap () + "\n";
textContent += manager.Unwrap ().GetAutoTextTokenFor (keynoteItem.GetId (), ACAPI::Keynote::KeynoteManager::AutoTextTokenSelector::Description).Unwrap () + "\n";
textContent += manager.Unwrap ().GetAutoTextTokenFor (keynoteItem.GetId (), ACAPI::Keynote::KeynoteManager::AutoTextTokenSelector::Reference).Unwrap () + "\n";

◆ GetRootFolder()

Result< KeynoteFolder > ACAPI::Keynote::KeynoteManager::GetRootFolder ( ) const
Returns
The root folder object of the keynote tree.
Example code snippets from Test / Keynote
if (manager.IsErr ()) {
Report (GS::UniString ("Failed to get Keynote Manager: ") + manager.UnwrapErr ().text.c_str ());
}
const ACAPI::Result<ACAPI::Keynote::KeynoteFolder> rootFolder = manager->GetRootFolder ();
if (rootFolder.IsErr ()) {
Report (GS::UniString ("Failed to get keynote root folder: ") + rootFolder.UnwrapErr ().text.c_str ());
return ACAPI::Result<ACAPI::Keynote::KeynoteFolder> {rootFolder.UnwrapErr (), rootFolder.Token ()};
}

Friends And Related Symbol Documentation

◆ CreateKeynoteManager

Result< KeynoteManager > CreateKeynoteManager ( )
friend

A function to create keynote manager instance, that lets you query and manipulate keynote related data.

Returns
The keynote manager instance.