Archicad 28 C++ API
|
Functions for manipulating and accessing AutoTexts. More...
Enumerations | |
enum class | API_NoteAutotextID { MeasuredValue , MeasuredValueToPZ , MeasuredValueToFirstRL , MeasuredValueToSecondRL , MeasuredValueToAltitude , MeasuredValueToSO , StoredOriginToPZ , TopElevToPZ , TopElevToFirstRL , TopElevToSecondRL , TopElevToAltitude , CoreTopElevToPZ , CoreTopElevToFirstRL , CoreTopElevToSecondRL , CoreTopElevToAltitude , CoreBottomElevToPZ , CoreBottomElevToFirstRL , CoreBottomElevToSecondRL , CoreBottomElevToAltitude , BottomElevToPZ , BottomElevToFirstRL , BottomElevToSecondRL , BottomElevToAltitude , ProjectZeroName , FirstReferenceLevelName , SecondReferenceLevelName , AltitudeName , StoredOriginName } |
Identifies the autotexts of the note. More... | |
enum | API_AppearID { APIApp_Normal , APIApp_Cumu , APIApp_CumuSv , APIApp_Elev } |
Describes the various options for the appearance of the dimensions. | |
enum | API_AutotextType { APIAutoText_Fixed = 0x00000001 , APIAutoText_Custom = 0x00000002 , APIAutoText_Other = 0x00000004 , APIAutoText_All = APIAutoText_Fixed + APIAutoText_Custom + APIAutoText_Other } |
Type of autotexts used in text and textual label elements. More... | |
Functions | |
GSErrCode | ACAPI_AutoText_GetAutoTextFlag (bool *showAutoText) |
Returns the mode flag currently set for autotext replacing in retrieved texts. | |
GSErrCode | ACAPI_AutoText_ChangeAutoTextFlag (bool *showAutoText) |
Switches autotexts to be replaced with their current values or kept as autotext keys in retrieved texts. | |
GSErrCode | ACAPI_AutoText_GetAutoTextKeys (char ***keys, char ***values) |
Retrieves all autotext keys and their values. | |
GSErrCode | ACAPI_AutoText_GetPropertyAutoTextKeyTable (API_Guid *guid, GS::HashTable< GS::UniString, GS::UniString > *keyGuidTable) |
Retrieves the context dependent autotexts keys. | |
GSErrCode | ACAPI_AutoText_InterpretAutoText (const GS::UniString *autotext, const API_Guid *guid, GS::UniString *value) |
Retrieves the context dependent autotext's value. | |
GSErrCode | ACAPI_AutoText_GetAutoTexts (GS::Array< GS::ArrayFB< GS::UniString, 3 > > *autotexts, API_AutotextType autotextType) |
Retrieves the key, description and value of the currently available autotexts. | |
GSErrCode | ACAPI_AutoText_SetAnAutoText (const GS::UniString *autotextDbKey=nullptr, const GS::UniString *autotextValue=nullptr) |
Sets the value of an autotext. | |
GSErrCode | ACAPI_AutoText_CreateAnAutoText (const API_Guid *guid, const char *uiKey) |
Creates a new entry in the Project Info. | |
GSErrCode | ACAPI_AutoText_DeleteAnAutoText (const char *dbKey) |
Deletes a custom entry from the Project Info. | |
GSErrCode | ACAPI_AutoText_GetNoteAutotexts (const API_ElemType ¬eOwnerType, std::unordered_map< API_NoteAutotextID, std::unordered_set< API_ElemType > > &elemTypesForAutotextIDs, const GS::Optional< API_AppearID > &dimAppear=GS::NoValue) |
Returns a map that contains an element type set for every available autotext regards to the note owner's type. | |
GSErrCode | ACAPI_AutoText_GetNoteKeywordForAutotextID (API_NoteAutotextID autotextID, GS::UniString &keyword) |
Returns the unistring keyword for note autotext id. | |
Functions for manipulating and accessing AutoTexts.
enum API_AutotextType |
Type of autotexts used in text and textual label elements.
|
strong |
Identifies the autotexts of the note.
GSErrCode ACAPI_AutoText_ChangeAutoTextFlag | ( | bool * | showAutoText | ) |
Switches autotexts to be replaced with their current values or kept as autotext keys in retrieved texts.
showAutoText | [in] The value of the autotext flag to be set. |
GSErrCode ACAPI_AutoText_CreateAnAutoText | ( | const API_Guid * | guid, |
const char * | uiKey | ||
) |
Creates a new entry in the Project Info.
guid | [in] The guid of the autotext (stored in the database). |
uiKey | [in] The string appear in the GUI (Project Info, Insert Autotext dialog). |
GSErrCode ACAPI_AutoText_DeleteAnAutoText | ( | const char * | dbKey | ) |
Deletes a custom entry from the Project Info.
dbKey | [in] The identifier of the autotext (stored in the database). |
GSErrCode ACAPI_AutoText_GetAutoTextFlag | ( | bool * | showAutoText | ) |
Returns the mode flag currently set for autotext replacing in retrieved texts.
showAutoText | [out] The current value of the autotext flag. |
GSErrCode ACAPI_AutoText_GetAutoTextKeys | ( | char *** | keys, |
char *** | values | ||
) |
Retrieves all autotext keys and their values.
keys | [out] Pointer to an array of C strings to be filled with the available autotext keys |
values | [out] Pointer to an array of C strings to be filled with the corresponding interpreted values (optional, can be nullptr) |
GSErrCode ACAPI_AutoText_GetAutoTexts | ( | GS::Array< GS::ArrayFB< GS::UniString, 3 > > * | autotexts, |
API_AutotextType | autotextType | ||
) |
Retrieves the key, description and value of the currently available autotexts.
autotexts | [out] Array of UniString triplets containing description, key and value of an autotext |
autotextType | [in] Filter for collecting only the given type of autotexts |
GSErrCode ACAPI_AutoText_GetNoteAutotexts | ( | const API_ElemType & | noteOwnerType, |
std::unordered_map< API_NoteAutotextID, std::unordered_set< API_ElemType > > & | elemTypesForAutotextIDs, | ||
const GS::Optional< API_AppearID > & | dimAppear = GS::NoValue |
||
) |
Returns a map that contains an element type set for every available autotext regards to the note owner's type.
noteOwnerType | [in] The note owner's type. |
elemTypesForAutotextIDs | [out] The result map for the note owner's type. The autotext is evaluable for the note if the parent element type is contained by the set. The empty set means the autotext is generally evaluable. |
dimAppear | [in] The dimAppear is an optional parameter. It is only needed when the note owner's type is API_DimensionID . |
API_DimensionID
then the given dimAppear is nullptr. GSErrCode ACAPI_AutoText_GetNoteKeywordForAutotextID | ( | API_NoteAutotextID | autotextID, |
GS::UniString & | keyword | ||
) |
Returns the unistring keyword for note autotext id.
autotextID | [in] The note autotext identifier. |
keyword | [out] The result keyword for the note autotext. |
GSErrCode ACAPI_AutoText_GetPropertyAutoTextKeyTable | ( | API_Guid * | guid, |
GS::HashTable< GS::UniString, GS::UniString > * | keyGuidTable | ||
) |
Retrieves the context dependent autotexts keys.
guid | [in] A pointer to a API_Guid that represents an object like a wall or slab. It can be APINULLGuid, but then only the general autotexts can be received like "Area", "Element ID" (which are common in all element types), and not the element specific ones like "Thickness of the wall". |
keyGuidTable | [out] Pointer to a hash table where the resulting autotext names and keys will be stored for a given guid. |
GSErrCode ACAPI_AutoText_InterpretAutoText | ( | const GS::UniString * | autotext, |
const API_Guid * | guid, | ||
GS::UniString * | value | ||
) |
Retrieves the context dependent autotext's value.
autotext | [in] A pointer to a GS::UniString containing the key for the context dependent autotexts key, without the '<' and '>' signs. For example the "<The autotext key>" should look like "The autotext key". |
guid | [in] Pointer to a API_Guid element for context dependency resolution. This can be the guid of any object which can contain an autotext. For example a label's guid is sufficient to resolve the autotext's value present on that label. |
value | [out] A GS::UniString pointer that is either empty or contains the autotext's value. |
GSErrCode ACAPI_AutoText_SetAnAutoText | ( | const GS::UniString * | autotextDbKey = nullptr , |
const GS::UniString * | autotextValue = nullptr |
||
) |
Sets the value of an autotext.
autotextDbKey | [in] The database key of autotext to be changed |
autotextValue | [in] The new autotext value for the specified key (optional, can be nullptr) |