2018-11-28
02:16 PM
- last edited on
2022-10-04
04:49 PM
by
Daniel Kassai
Solved! Go to Solution.
2018-11-30 04:21 AM
kzaremba wrote:Hi,
I have quite a simple question. But I really could find a simple solution in the documentation. I have check Element and Memo structure and it's not there.
I would like to access element ID and also other Properties which are older than properties like: structural function, position. How can I do it?
2018-11-30 04:21 AM
kzaremba wrote:Hi,
I have quite a simple question. But I really could find a simple solution in the documentation. I have check Element and Memo structure and it's not there.
I would like to access element ID and also other Properties which are older than properties like: structural function, position. How can I do it?
2018-11-30 11:17 AM
leilei wrote:Thanks a lot, I would never found it out
elemInfoString
2018-11-30 11:43 AM
// -----------------------------------------------------------------------------
// Dump element category value
// -----------------------------------------------------------------------------
void Do_DumpElemCategoryValue (const API_ElemCategoryValue& elemCategoryValue)
{
WriteReport (" %s : %s (%s)", GS::UniString (elemCategoryValue.category.name).ToCStr ().Get (), GS::UniString (elemCategoryValue.name).ToCStr ().Get (), APIGuidToString (elemCategoryValue.guid).ToCStr ().Get ());
}
// -----------------------------------------------------------------------------
// Dump element's categories
// -----------------------------------------------------------------------------
void Do_DumpElemCategories (const API_Guid& elemGuid, const API_ElemTypeID& typeID, const API_ElemVariationID& variationID, bool dumpDefaults)
{
GSErrCode err = NoError;
GS::Array<API_ElemCategory> categoryList;
ACAPI_Database (APIDb_GetElementCategoriesID, &categoryList);
categoryList.Enumerate ([&] (const API_ElemCategory& category) {
if (category.categoryID != API_ElemCategory_BRI) {
API_ElemCategoryValue elemCategoryValue;
if (dumpDefaults) {
err = ACAPI_Element_GetCategoryValueDefault (typeID, variationID, category, &elemCategoryValue);
if (err == NoError)
Do_DumpElemCategoryValue (elemCategoryValue);
else
ErrorBeep ("ACAPI_Element_GetCategoryValueDefault ()", err);
} else {
err = ACAPI_Element_GetCategoryValue (elemGuid, category, &elemCategoryValue);
if (err == NoError)
Do_DumpElemCategoryValue (elemCategoryValue);
else
ErrorBeep ("ACAPI_Element_GetCategoryValue ()", err);
}
}
});
}
2018-11-30 11:48 AM