Archicad 28 C++ API
Loading...
Searching...
No Matches
ACAPI::MEP::v1::PipeBranchPreferenceTable Class Referencefinal

The PipeBranchPreferenceTable contains cross section and geometry related information for Pipe branches. More...

#include <MEPPipeBranchPreferenceTable.hpp>

Inheritance diagram for ACAPI::MEP::v1::PipeBranchPreferenceTable:
ACAPI::v1::Object

Public Member Functions

bool Exists () const
 
Result< void > IsEditable () const
 Checks whether the table is editable.
 
GS::UniString GetName () const
 
uint32_t GetSize () const
 
Result< uint32_t > GetMainAxisReferenceId (uint32_t index) const
 
Result< uint32_t > GetBranchAxisReferenceId (uint32_t index) const
 
Result< bool > IsRowValid (uint32_t index) const
 A row is considered valid if both diameters, the length, the branchOffset and the connectionLength contains non-zero values, description is optional.
 
Result< bool > IsRowValidByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 A row is considered valid if both diameters, the length, the branchOffset and the connectionLength contains non-zero values, description is optional.
 
Result< double > GetMainAxisDiameter (uint32_t index) const
 
Result< double > GetMainAxisDiameterByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
Result< double > GetBranchAxisDiameter (uint32_t index) const
 
Result< double > GetBranchAxisDiameterByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
Result< double > GetLength (uint32_t index) const
 
Result< double > GetLengthByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
Result< double > GetBranchOffset (uint32_t index) const
 
Result< double > GetBranchOffsetByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
Result< double > GetConnectionLength (uint32_t index) const
 
Result< double > GetConnectionLengthByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
Result< GS::UniString > GetDescription (uint32_t index) const
 
Result< GS::UniString > GetDescriptionByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId) const
 
template<typename ModifierFunc >
Result< void > Modify (const ModifierFunc &modifierFunc, const GS::UniString &undoString)
 Executes the passed modifier scope in an Undoable command.
 
void SetName (const GS::UniString &tableName)
 Sets the name of the table.
 
Result< uint32_t > AddNewRow (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId)
 Inserts a new row into the table.
 
Result< void > DeleteRow (uint32_t index)
 Deletes a row from the table.
 
Result< void > DeleteRowByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId)
 Deletes a row from the table.
 
Result< void > SetMainAxisDiameter (uint32_t index, double diameter)
 Sets the main axis diameter value of a table's row.
 
Result< void > SetMainAxisDiameterByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, double diameter)
 Sets the main axis diameter value of a table's row.
 
Result< void > SetBranchAxisDiameter (uint32_t index, double diameter)
 Sets the branch axis diameter value of a table's row.
 
Result< void > SetBranchAxisDiameterByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, double diameter)
 Sets the branch axis diameter value of a table's row.
 
Result< void > SetLength (uint32_t index, double length)
 Sets the length value of a table's row.
 
Result< void > SetLengthByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, double length)
 Sets the diameter value of a table's row.
 
Result< void > SetBranchOffset (uint32_t index, double branchOffset)
 Sets the branch offset value of a table's row.
 
Result< void > SetBranchOffsetByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, double branchOffset)
 Sets the branch offset value of a table's row.
 
Result< void > SetConnectionLength (uint32_t index, double connectionLength)
 Sets the connection length value of a table's row.
 
Result< void > SetConnectionLengthByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, double connectionLength)
 Sets the connection length value of a table's row.
 
Result< void > SetDescription (uint32_t index, const GS::UniString &description)
 Sets the description of a table's row.
 
Result< void > SetDescriptionByReferenceIds (uint32_t mainAxisReferenceId, uint32_t branchAxisReferenceId, const GS::UniString &description)
 Sets the description of a table's row.
 
- Public Member Functions inherited from ACAPI::v1::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< PipeBranchPreferenceTableGet (const UniqueID &uniqueId)
 Returns a PipeBranchPreferenceTable.
 

Protected Member Functions

 Modifier (PipeBranchPreferenceTable &parent)
 Constructs a Modifier with the given PipeBranchPreferenceTable.
 
- Protected Member Functions inherited from ACAPI::v1::Object
 ~Object ()
 Default destructor.
 

Additional Inherited Members

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

Detailed Description

The PipeBranchPreferenceTable contains cross section and geometry related information for Pipe branches.

Since
Archicad 28

The table uses the keys defined by the PipeReferenceSet. To consider a table row usable and valid, it should have all its fields filled, beside its description, which is optional.

Example code snippet from Test / New MEP
Getters
for (const UniqueID& pipeBranchTableId : pipeBranchTableIds) {
if (pipeBranchTable.IsErr ())
continue;
preferenceReporter.SetTabCount (2);
preferenceReporter.Add ("Preference name", pipeBranchTable->GetName ());
preferenceReporter.Add ("Circular table:");
for (uint32_t i = 0; i < pipeBranchTable->GetSize (); ++i) {
preferenceReporter.SetTabCount (3);
preferenceReporter.Add ("Main Axis ReferenceId", *pipeBranchTable->GetMainAxisReferenceId (i), false);
preferenceReporter.SetTabCount (0);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Axis ReferenceId", *pipeBranchTable->GetBranchAxisReferenceId (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Main Axis Diameter", *pipeBranchTable->GetMainAxisDiameter (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Axis Diameter", *pipeBranchTable->GetBranchAxisDiameter (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Length", *pipeBranchTable->GetLength (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Offset", *pipeBranchTable->GetBranchOffset (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Connection Length", *pipeBranchTable->GetConnectionLength (i), false);
preferenceReporter.Add (", ", false);
GS::UniString description = *pipeBranchTable->GetDescription (i);
preferenceReporter.Add ("Description", description == GS::EmptyUniString ? "Empty" : description, false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add (*pipeBranchTable->IsRowValid (i) ? "Row is valid" : "Row is not valid");
}
preferenceReporter.AddNewLine ();
}
The MEP unique identifier.
Definition: MEPUniqueID.hpp:30
static Result< PipeBranchPreferenceTable > Get(const UniqueID &uniqueId)
Returns a PipeBranchPreferenceTable.
Result is the standard return type of API functions.
Definition: Result.hpp:845
bool IsErr() const
Definition: Result.hpp:945
Modification
for (const UniqueID& pipeBranchTableId : pipeBranchTableIds) {
if (pipeBranchTable.IsErr ())
continue;
preferenceReporter.SetTabCount (2);
preferenceReporter.Add ("Preference name", pipeBranchTable->GetName ());
preferenceReporter.Add ("Circular table:");
for (uint32_t i = 0; i < pipeBranchTable->GetSize (); ++i) {
preferenceReporter.SetTabCount (3);
preferenceReporter.Add ("Main Axis ReferenceId", *pipeBranchTable->GetMainAxisReferenceId (i), false);
preferenceReporter.SetTabCount (0);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Axis ReferenceId", *pipeBranchTable->GetBranchAxisReferenceId (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Main Axis Diameter", *pipeBranchTable->GetMainAxisDiameter (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Axis Diameter", *pipeBranchTable->GetBranchAxisDiameter (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Length", *pipeBranchTable->GetLength (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Branch Offset", *pipeBranchTable->GetBranchOffset (i), false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add ("Connection Length", *pipeBranchTable->GetConnectionLength (i), false);
preferenceReporter.Add (", ", false);
GS::UniString description = *pipeBranchTable->GetDescription (i);
preferenceReporter.Add ("Description", description == GS::EmptyUniString ? "Empty" : description, false);
preferenceReporter.Add (", ", false);
preferenceReporter.Add (*pipeBranchTable->IsRowValid (i) ? "Row is valid" : "Row is not valid");
}
preferenceReporter.AddNewLine ();
}

Member Function Documentation

◆ AddNewRow()

Result< uint32_t > ACAPI::MEP::v1::PipeBranchPreferenceTable::AddNewRow ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
)

Inserts a new row into the table.

Parameters
mainAxisReferenceIdThe main axis referenceId of the new row. It must be a referenceId that is defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the new row. It must be a referenceId that is defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds is already present in the table or if the branch axis referenceId is larger than the main axis referenceId, otherwise the index of the new row.

◆ DeleteRow()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::DeleteRow ( uint32_t  index)

Deletes a row from the table.

Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise nothing.

◆ DeleteRowByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::DeleteRowByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
)

Deletes a row from the table.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise nothing.

◆ Exists()

bool ACAPI::MEP::v1::PipeBranchPreferenceTable::Exists ( ) const
Returns
Checks if the object still exists.

◆ Get()

static Result< PipeBranchPreferenceTable > ACAPI::MEP::v1::PipeBranchPreferenceTable::Get ( const UniqueID uniqueId)
static

Returns a PipeBranchPreferenceTable.

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

◆ GetBranchAxisDiameter()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetBranchAxisDiameter ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the branch axis diameter value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetBranchAxisDiameterByReferenceIds()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetBranchAxisDiameterByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the branch axis diameter value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetBranchAxisReferenceId()

Result< uint32_t > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetBranchAxisReferenceId ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the branch axis referenceId of the table's row.

◆ GetBranchOffset()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetBranchOffset ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the branch offset value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetBranchOffsetByReferenceIds()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetBranchOffsetByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the branch offset value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetConnectionLength()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetConnectionLength ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the connection length value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetConnectionLengthByReferenceIds()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetConnectionLengthByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the connection length value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetDescription()

Result< GS::UniString > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetDescription ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the description of the table's row.

◆ GetDescriptionByReferenceIds()

Result< GS::UniString > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetDescriptionByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the description of the table's row.

◆ GetLength()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetLength ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the length value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetLengthByReferenceIds()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetLengthByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the length value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetMainAxisDiameter()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetMainAxisDiameter ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the main axis diameter value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetMainAxisDiameterByReferenceIds()

Result< double > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetMainAxisDiameterByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const
Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the main axis diameter value of the table's row. If the returned value is 0.0, the row is not valid yet.

◆ GetMainAxisReferenceId()

Result< uint32_t > ACAPI::MEP::v1::PipeBranchPreferenceTable::GetMainAxisReferenceId ( uint32_t  index) const
Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the main axis referenceId of the table's row.

◆ GetName()

GS::UniString ACAPI::MEP::v1::PipeBranchPreferenceTable::GetName ( ) const
Returns
Returns the name of the table.

◆ GetSize()

uint32_t ACAPI::MEP::v1::PipeBranchPreferenceTable::GetSize ( ) const
Returns
Returns the size of table.

◆ IsEditable()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::IsEditable ( ) const

Checks whether the table is editable.

Returns
Returns nothing if the table is editable, otherwise the error code and error message containing information about the reason.

◆ IsRowValid()

Result< bool > ACAPI::MEP::v1::PipeBranchPreferenceTable::IsRowValid ( uint32_t  index) const

A row is considered valid if both diameters, the length, the branchOffset and the connectionLength contains non-zero values, description is optional.

Parameters
indexThe index of the row. Index starts from 0.
Returns
Returns error if the index is out of range, otherwise returns the validity state of the row.

◆ IsRowValidByReferenceIds()

Result< bool > ACAPI::MEP::v1::PipeBranchPreferenceTable::IsRowValidByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId 
) const

A row is considered valid if both diameters, the length, the branchOffset and the connectionLength contains non-zero values, description is optional.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
Returns
Returns error if the pair of referenceIds does not occur in the table, otherwise returns the validity state of the row.

◆ Modifier()

ACAPI::MEP::v1::PipeBranchPreferenceTable::Modifier ( PipeBranchPreferenceTable parent)
protected

Constructs a Modifier with the given PipeBranchPreferenceTable.

Parameters
parentThe given PipeBranchPreferenceTable.

◆ Modify()

template<typename ModifierFunc >
Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::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.

◆ SetBranchAxisDiameter()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetBranchAxisDiameter ( uint32_t  index,
double  diameter 
)

Sets the branch axis diameter value of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
diameterThe value to be set. Must be a non-zero positive number.
Returns
Returns nothing if the operation was successful, or returns error:
  • if the index is out of range;
  • if the value is larger than the already defined main axis diameter;
  • if the value is larger or equal than the already defined length;
  • if branch offset is already defined and the value is larger than 2 * branchOffset;
  • if branch offset and length are already defined and the value is larger than 2 * (length - branchOffset).

◆ SetBranchAxisDiameterByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetBranchAxisDiameterByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
double  diameter 
)

Sets the branch axis diameter value of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
diameterThe value to be set. Must be a non-zero positive number.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns nothing if the operation was successful, or returns error:
  • if at least one referenceId is not in the PipeReferenceSet;
  • if the value is larger than the already defined main axis diameter;
  • if the value is larger or equal than the already defined length;
  • if branch offset is already defined and the value is larger than 2 * branchOffset;
  • if branch offset and length are already defined and the value is larger than 2 * (length - branchOffset).

◆ SetBranchOffset()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetBranchOffset ( uint32_t  index,
double  branchOffset 
)

Sets the branch offset value of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
branchOffsetThe value to be set. Must be a non-zero positive number.
Returns
Returns nothing if the operation was successful, or returns error:
  • if the index is out of range;
  • if the value is smaller than (branchAxisDiameter / 2);
  • if length and branch axis diameter are already defined and the value is larger than the (length - branchAxisDiameter / 2).

◆ SetBranchOffsetByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetBranchOffsetByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
double  branchOffset 
)

Sets the branch offset value of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchOffsetThe value to be set. Must be a non-zero positive number.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns nothing if the operation was successful, or returns error:
  • if at least one referenceId is not in the PipeReferenceSet;
  • if the value is smaller than (branchAxisDiameter / 2);
  • if length and branch axis diameter are already defined and the value is larger than the (length - branchAxisDiameter / 2).

◆ SetConnectionLength()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetConnectionLength ( uint32_t  index,
double  connectionLength 
)

Sets the connection length value of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
connectionLengthThe value to be set. Must be a non-zero positive number.
Returns
Returns error if the index is out of range, otherwise nothing.

◆ SetConnectionLengthByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetConnectionLengthByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
double  connectionLength 
)

Sets the connection length value of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
connectionLengthThe value to be set. Must be a non-zero positive number.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns error if at least one referenceId is not in the PipeReferenceSet, otherwise nothing.

◆ SetDescription()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetDescription ( uint32_t  index,
const GS::UniString &  description 
)

Sets the description of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
descriptionThe description to be set.
Returns
Returns error if the index is out of range, otherwise nothing.

◆ SetDescriptionByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetDescriptionByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
const GS::UniString &  description 
)

Sets the description of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
descriptionThe description to be set.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns error if at least one referenceId is not in the PipeReferenceSet, otherwise nothing.

◆ SetLength()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetLength ( uint32_t  index,
double  length 
)

Sets the length value of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
lengthThe value to be set. Must be a non-zero positive number.
Returns
Returns nothing if the operation was successful, or returns error:
  • if the index is out of range;
  • if the value is smaller than the branch axis diameter;
  • if the value is smaller than (branchOffset + branchAxisDiameter / 2).

◆ SetLengthByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetLengthByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
double  length 
)

Sets the diameter value of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
lengthThe value to be set. Must be a non-zero positive number.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns nothing if the operation was successful, or returns error:
  • if at least one referenceId is not in the PipeReferenceSet;
  • if the value is smaller than the branch axis diameter;
  • if the value is smaller than (branchOffset + branchAxisDiameter / 2).

◆ SetMainAxisDiameter()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetMainAxisDiameter ( uint32_t  index,
double  diameter 
)

Sets the main axis diameter value of a table's row.

Parameters
indexThe index of the row. Index starts from 0.
diameterThe value to be set. Must be a non-zero positive number.
Returns
Returns error if the index is out of range or if the value is smaller than the branch axis diameter, otherwise nothing.

◆ SetMainAxisDiameterByReferenceIds()

Result< void > ACAPI::MEP::v1::PipeBranchPreferenceTable::SetMainAxisDiameterByReferenceIds ( uint32_t  mainAxisReferenceId,
uint32_t  branchAxisReferenceId,
double  diameter 
)

Sets the main axis diameter value of a table's row.

Parameters
mainAxisReferenceIdThe main axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
branchAxisReferenceIdThe branch axis referenceId of the row. The table only contains the referenceIds that are defined in the PipeReferenceSet.
diameterThe value to be set. Must be a non-zero positive number.

If there isn't any row with the given pair of referenceIds, but both the referenceIds are defined in the PipeReferenceSet, it will insert the row.

Returns
Returns error if at least one referenceId is not in the PipeReferenceSet, or if the value is smaller than the branch axis diameter, otherwise nothing.

◆ SetName()

void ACAPI::MEP::v1::PipeBranchPreferenceTable::SetName ( const GS::UniString &  tableName)

Sets the name of the table.

Parameters
tableNameThe name to be set.