GSErrCode traversalError { NoError };
return true;
std::string connectedFrom;
else
connectedFrom = "No connection";
std::string connectedTo;
connectedTo = "No connections";
else {
for (const auto nextElement : node.GetNextElements ()) {
if (!connectedTo.empty ())
connectedTo += ", ";
connectedTo += std::to_string (idToIndex[nextElement]);
}
}
if (traversalError != NoError)
return false;
textElement.
text.
loc.
x = mepElement->GetAnchorPoint ().x;
textElement.
text.
loc.
y = mepElement->GetAnchorPoint ().y;
textMemo.
textContent =
new GS::UniString { GS::UniString::SPrintf (
"%llu:\nConnectedFrom: %s\nConnectedTo: %s", idToIndex[node.
GetElement ()], connectedFrom.c_str (), connectedTo.c_str ()) };
if (traversalError == NoError)
if (traversalError != NoError)
return false;
return true;
});
A structural helper class used when iterating through a DistributionSystem in the DistributionSystems...
Definition: MEPDistributionSystemsGraphTreeNode.hpp:43
std::optional< UniqueID > GetPreviousElement() const
UniqueID GetElement() const
std::vector< UniqueID > GetNextElements() const
static Result< Element > Get(const UniqueID &uniqueId)
Returns an Element.
Result is the standard return type of API functions.
Definition: Result.hpp:845
bool IsErr() const
Definition: Result.hpp:945
GSErrCode ACAPI_Element_GetDefaults(API_Element *element, API_ElementMemo *memo)
Retrieves the actual default settings for the element of type.
GSErrCode ACAPI_DisposeElemMemoHdls(API_ElementMemo *memo)
Frees the memory occupied by all of the allocated memo handles.
GSErrCode ACAPI_Element_Create(API_Element *element, API_ElementMemo *memo)
Places a new element into current database.
double x
Horizontal coordinate.
Definition: APIdefs_Base.h:87
double y
Vertical coordinate.
Definition: APIdefs_Base.h:93
API_ElemType type
The type of the element.
Definition: APIdefs_Elements.h:407
Describes the variable length additional data of elements.
Definition: APIdefs_Elements.h:17660
GS::UniString * textContent
Text content for textual elements.
Definition: APIdefs_Elements.h:17750
bool multiStyle
Multistyle text (input only).
Definition: APIdefs_Elements.h:9033
API_Coord loc
Coordinates of text anchor point.
Definition: APIdefs_Elements.h:9009
double size
Character height in mm.
Definition: APIdefs_Elements.h:8933
A union collecting all known element types.
Definition: APIdefs_Elements.h:17120
API_Elem_Head header
General element header.
Definition: APIdefs_Elements.h:17126
API_TextType text
Represents a text.
Definition: APIdefs_Elements.h:17219
GetElements