FormIt C++ API  v23.0.0 (2023.0.0)
WSM::Result Class Reference

Description

Private member m_pRI in Result is not exported and causes a warning that can be safely ignored.

The Result class indicates whether or not an API was successful.

#include <Result.h>

Public Types

enum  nResultType {
  nOK = 0, nFail, nAttributeAndOwnerIncorrectlyConnected, nAttributeHasBadOwner,
  nBadHistoryID, nBadInput, nBadLoopContainment, nBadOffset,
  nBadShellContainment, nBaseDeltaNotFound, nBlendAttributeHasBadData, nBlendAttributeHasBadOwner,
  nBodyHasBadBoundingBox, nBodysLumpNotOwnedByBody, nCaughtException, nCircleAttributeHasBadData,
  nCircleAttributeHasBadOwner, nCoedgeAndNextHaveDifferentLoops, nCoedgeAndNextDoNotMatch, nCoedgeAndPartnerHaveDifferentEdges,
  nCoedgeAndPreviousHaveDifferentLoops, nCoedgeAndPreviousDoNotMatch, nCoedgesBadlyConnected, nCoedgeHasNoEdge,
  nCoedgePartnerChainIsBad, nCylinderSurfaceAttributeHasBadData, nCylinderSurfaceAttributeHasBadOwner, nDWGFileNotAccessible,
  nDWGFileNotRecognized, nEdgeGeometryIsBad, nEdgeHasBadUseCount, nEdgeIsIncomplete,
  nExtrudeEdgesCreatesOverlappingFaces, nExtrudeSurfaceAttributeHasBadData, nExtrudeSurfaceAttributeHasBadOwner, nFaceHasBadBoundingBox,
  nFaceHasBadFacets, nFacesLoopNotOwnedByFace, nFaceUVDataAttributeHasBadOwner, nFaceWithNoLoops,
  nFacetsTooFarFromOriginMoved, nFailedFileEmpty, nFailedToFindDeltaInObjectHistoryRecords, nFailedToGetObjectHistoryRecordsFromExistingDelta,
  nFailedToGetObjectHistoryRecordsFromSerializedDelta, nFailedToLoadDelta, nFailedToLoadDeltaBaseIDMismatch, nFailedToOpenFile,
  nGeometryForFaceNonPlanar, nGroupHasBadHistory, nGroupHasCircularReference, nGroupHasNoInstance,
  nGroupInstanceMismatch, nGroupNotCreatedDueToCircularReference, nHistoryEdgeTreeIsBad, nHistoryFaceTreeIsBad,
  nHistoryHasBadDeltaOrder, nHistoryHasBadOwningGroup, nHistoryHasMoreThanOneGeneratedGeometryInformation, nHistoryHasNoDynamoModelInformation,
  nHistoryHasNoRevitFamilyInformation, nHistoryInstanceTreeIsBad, nHistoryLayerSearchSetIsBad, nHistoryLevelSearchSetIsBad,
  nHistoryLoadFailedIntoNonEmpty, nHistoryLoadFailedInvalidParams, nHistoryLoadFailedToResolveIDs, nHistoryMaterialSearchSetIsBad,
  nHistoryMeshTreeIsBad, nHistoryOperationFail, nHistoryTextureSearchSetIsBad, nHistoryVertexTreeIsBad,
  nImageTextureAndSatelliteNotAllowedTogether, nInstanceHasBadBoundingBox, nInstanceHasBadTransformation, nInstanceWithoutGroup,
  nInvalidDeltaInObjectHistory, nInvalidObjectIDToReuse, nInvalidSerializedData, nInvalidSerializedDataHeader,
  nInvalidSerializedDataPartiallyLoaded, nInvalidSerializedDataWrongObjID, nInvalidSerializedDataWrongReadPosition, nLayerAttributeHasBadLayer,
  nLayerHasBadAttribute, nLayerHasTooManyAttributes, nLayerNotInSearchSet, nLevelAttributeHasBadLevel,
  nLevelHasBadAttribute, nLevelHasTooManyAttributes, nLevelNotInSearchSet, nLoadDeltaBaseNotFound,
  nLoadDeltaFailed, nLoadDeltaFailedReapplyTrailing, nLoadDeltaInvalidHeader, nLoopAndCoedgeDoNotMatch,
  nLoopAreaIncorrect, nLoopWithNoCoedge, nLumpsShellNotOwnedByLump, nMaterialAttributeHasBadMaterial,
  nMaterialHasBadAttribute, nMaterialHasBadData, nMaterialHasTooManyAttributes, nMaterialNotInSearchSet,
  nMeshHasBadData, nNoTopLevelObjectsOrInstancesSelected, nNullDelta, nNullObjectHistory,
  nObjectHasDuplicateAttributes, nObjectInDeltaDoesntContainThisDeltaOnce, nObjectNotInOwnersChildrenList, nObjectsWereGrouped,
  nOBJFileContainsFreeFormGeometry, nOutOfMemory, nRepairFailed, nShellNotProperlyConnected,
  nShellsFaceNotOwnedByShell, nSKPImportIncomplete, nSKPVersionError, nSolidDefImportIncomplete,
  nSomeInputIgnored, nSphereSurfaceAttributeHasBadData, nSphereSurfaceAttributeHasBadOwner, nSplineCurveAttributeHasBadData,
  nSplineCurveAttributeHasBadOwner, nSplineCurveAttributeHasMoreThanOneSurfaceOwner, nStringAttributeHasNoKey, nTextureAndOwnerIncorrectlyConnected,
  nTextureHasBadOwner, nTextureMemoryIncorrectSize, nTextureNotInSearchSet, nTextureNotSupportedFormat,
  nUndoFailed, nVertexHasBadEdgeInEdgeGroups, nVertexHasBadUseCount, nVertexHasOverlappingEdgeGroups,
  nVertexTooFarFromFace, nVerticesOverlap, nWrongDeltaOrderInObjectHistory, nNumResultTypes
}
 

Public Member Functions

 Result (nResultType resutType=nOK)
 
bool IsGood () const
 Returns true if no errors were reported. More...
 
nResultType GetErrorCode () const
 Return the error code. More...
 
bool HasWarning () const
 Returns true if no warnings were reported. More...
 
nResultType GetWarningCode () const
 Return the warning code. More...
 
bool HasHistoryObjectIDs () const
 Are there pairs of History/Object IDs identifying Objects associated with an error or warning. More...
 
size_t GetHistoryObjectIDs (1::vector< ObjectHistoryID > &aHistoryObjectIDs) const
 Get the pairs of History/Object IDs identifying Objects associated with an error or warning. More...
 
::string GetErrorString () const
 Returns a human readable string for the Result error or warning. More...
 
::string GetErrorStringFormat () const
 Returns the original format string for the Result error or warning. More...
 
::string GetErrorStringUsingFormat (const 1::string &ErrorStringFormat) const
 Returns a human readable string for the Result error or warning using a format string. More...
 
void SetErrorCode (Result::nResultType nRT, const 1::vector< size_t > &aIDs={})
 Sets the error code. More...
 
void SetErrorCode (Result::nResultType nRT, size_t nID)
 
void SetErrorCode (Result::nResultType nRT, const 1::vector< ObjectHistoryID > &aHistoryObjectIDs)
 Sets the error code. More...
 
void SetWarningCode (Result::nResultType nRT, const 1::vector< size_t > &aIDs={})
 Sets the warning code. More...
 
void SetWarningCode (Result::nResultType nRT, size_t nID)
 
void SetWarningCode (Result::nResultType nRT, const 1::vector< ObjectHistoryID > &aHistoryObjectIDs)
 Sets the warning code. More...
 
ResultImplementation * GetImplementation ()
 Return the implementation. For use internally. More...
 

Member Enumeration Documentation

Enumerator
nOK 

These must be consecutive starting at 0. If a new code is added here, update the strings in Result.cpp.

nFail 

Generic error when more specific details are unknown.

nAttributeAndOwnerIncorrectlyConnected 
nAttributeHasBadOwner 
nBadHistoryID 
nBadInput 
nBadLoopContainment 
nBadOffset 
nBadShellContainment 
nBaseDeltaNotFound 
nBlendAttributeHasBadData 
nBlendAttributeHasBadOwner 
nBodyHasBadBoundingBox 
nBodysLumpNotOwnedByBody 
nCaughtException 
nCircleAttributeHasBadData 
nCircleAttributeHasBadOwner 
nCoedgeAndNextHaveDifferentLoops 
nCoedgeAndNextDoNotMatch 
nCoedgeAndPartnerHaveDifferentEdges 
nCoedgeAndPreviousHaveDifferentLoops 
nCoedgeAndPreviousDoNotMatch 
nCoedgesBadlyConnected 
nCoedgeHasNoEdge 
nCoedgePartnerChainIsBad 
nCylinderSurfaceAttributeHasBadData 
nCylinderSurfaceAttributeHasBadOwner 
nDWGFileNotAccessible 
nDWGFileNotRecognized 
nEdgeGeometryIsBad 
nEdgeHasBadUseCount 
nEdgeIsIncomplete 
nExtrudeEdgesCreatesOverlappingFaces 
nExtrudeSurfaceAttributeHasBadData 
nExtrudeSurfaceAttributeHasBadOwner 
nFaceHasBadBoundingBox 
nFaceHasBadFacets 
nFacesLoopNotOwnedByFace 
nFaceUVDataAttributeHasBadOwner 
nFaceWithNoLoops 
nFacetsTooFarFromOriginMoved 
nFailedFileEmpty 
nFailedToFindDeltaInObjectHistoryRecords 
nFailedToGetObjectHistoryRecordsFromExistingDelta 
nFailedToGetObjectHistoryRecordsFromSerializedDelta 
nFailedToLoadDelta 
nFailedToLoadDeltaBaseIDMismatch 
nFailedToOpenFile 
nGeometryForFaceNonPlanar 
nGroupHasBadHistory 
nGroupHasCircularReference 
nGroupHasNoInstance 
nGroupInstanceMismatch 
nGroupNotCreatedDueToCircularReference 
nHistoryEdgeTreeIsBad 
nHistoryFaceTreeIsBad 
nHistoryHasBadDeltaOrder 
nHistoryHasBadOwningGroup 
nHistoryHasMoreThanOneGeneratedGeometryInformation 
nHistoryHasNoDynamoModelInformation 
nHistoryHasNoRevitFamilyInformation 
nHistoryInstanceTreeIsBad 
nHistoryLayerSearchSetIsBad 
nHistoryLevelSearchSetIsBad 
nHistoryLoadFailedIntoNonEmpty 
nHistoryLoadFailedInvalidParams 
nHistoryLoadFailedToResolveIDs 
nHistoryMaterialSearchSetIsBad 
nHistoryMeshTreeIsBad 
nHistoryOperationFail 
nHistoryTextureSearchSetIsBad 
nHistoryVertexTreeIsBad 
nImageTextureAndSatelliteNotAllowedTogether 
nInstanceHasBadBoundingBox 
nInstanceHasBadTransformation 
nInstanceWithoutGroup 
nInvalidDeltaInObjectHistory 
nInvalidObjectIDToReuse 
nInvalidSerializedData 
nInvalidSerializedDataHeader 
nInvalidSerializedDataPartiallyLoaded 
nInvalidSerializedDataWrongObjID 
nInvalidSerializedDataWrongReadPosition 
nLayerAttributeHasBadLayer 
nLayerHasBadAttribute 
nLayerHasTooManyAttributes 
nLayerNotInSearchSet 
nLevelAttributeHasBadLevel 
nLevelHasBadAttribute 
nLevelHasTooManyAttributes 
nLevelNotInSearchSet 
nLoadDeltaBaseNotFound 
nLoadDeltaFailed 
nLoadDeltaFailedReapplyTrailing 
nLoadDeltaInvalidHeader 
nLoopAndCoedgeDoNotMatch 
nLoopAreaIncorrect 
nLoopWithNoCoedge 
nLumpsShellNotOwnedByLump 
nMaterialAttributeHasBadMaterial 
nMaterialHasBadAttribute 
nMaterialHasBadData 
nMaterialHasTooManyAttributes 
nMaterialNotInSearchSet 
nMeshHasBadData 
nNoTopLevelObjectsOrInstancesSelected 
nNullDelta 
nNullObjectHistory 
nObjectHasDuplicateAttributes 
nObjectInDeltaDoesntContainThisDeltaOnce 
nObjectNotInOwnersChildrenList 
nObjectsWereGrouped 
nOBJFileContainsFreeFormGeometry 
nOutOfMemory 
nRepairFailed 
nShellNotProperlyConnected 
nShellsFaceNotOwnedByShell 
nSKPImportIncomplete 
nSKPVersionError 
nSolidDefImportIncomplete 
nSomeInputIgnored 
nSphereSurfaceAttributeHasBadData 
nSphereSurfaceAttributeHasBadOwner 
nSplineCurveAttributeHasBadData 
nSplineCurveAttributeHasBadOwner 
nSplineCurveAttributeHasMoreThanOneSurfaceOwner 
nStringAttributeHasNoKey 
nTextureAndOwnerIncorrectlyConnected 
nTextureHasBadOwner 
nTextureMemoryIncorrectSize 
nTextureNotInSearchSet 
nTextureNotSupportedFormat 
nUndoFailed 
nVertexHasBadEdgeInEdgeGroups 
nVertexHasBadUseCount 
nVertexHasOverlappingEdgeGroups 
nVertexTooFarFromFace 
nVerticesOverlap 
nWrongDeltaOrderInObjectHistory 
nNumResultTypes 

This must alway be last.

Constructor & Destructor Documentation

WSM::Result::Result ( nResultType  resutType = nOK)

Member Function Documentation

nResultType WSM::Result::GetErrorCode ( ) const

Return the error code.

::string WSM::Result::GetErrorString ( ) const

Returns a human readable string for the Result error or warning.

::string WSM::Result::GetErrorStringFormat ( ) const

Returns the original format string for the Result error or warning.

::string WSM::Result::GetErrorStringUsingFormat ( const 1::string &  ErrorStringFormat) const

Returns a human readable string for the Result error or warning using a format string.

size_t WSM::Result::GetHistoryObjectIDs ( 1::vector< ObjectHistoryID > &  aHistoryObjectIDs) const

Get the pairs of History/Object IDs identifying Objects associated with an error or warning.

ResultImplementation* WSM::Result::GetImplementation ( )

Return the implementation. For use internally.

nResultType WSM::Result::GetWarningCode ( ) const

Return the warning code.

bool WSM::Result::HasHistoryObjectIDs ( ) const

Are there pairs of History/Object IDs identifying Objects associated with an error or warning.

bool WSM::Result::HasWarning ( ) const

Returns true if no warnings were reported.

bool WSM::Result::IsGood ( ) const

Returns true if no errors were reported.

void WSM::Result::SetErrorCode ( Result::nResultType  nRT,
const 1::vector< size_t > &  aIDs = {} 
)

Sets the error code.

If aIDs is not empty, these ID(s) are used to provide additional information for the error about something, e.g. History or Delta, associated with the error.

void WSM::Result::SetErrorCode ( Result::nResultType  nRT,
size_t  nID 
)
inline
void WSM::Result::SetErrorCode ( Result::nResultType  nRT,
const 1::vector< ObjectHistoryID > &  aHistoryObjectIDs 
)

Sets the error code.

If aHistoryObjectIDs is not empty, these ID(s) are used to provide additional information for the error about associated WSM Objects.

void WSM::Result::SetWarningCode ( Result::nResultType  nRT,
const 1::vector< size_t > &  aIDs = {} 
)

Sets the warning code.

If aIDs is not empty, these ID(s) are used to provide additional information for the error about something, e.g. History or Delta, associated with the error.

void WSM::Result::SetWarningCode ( Result::nResultType  nRT,
size_t  nID 
)
inline
void WSM::Result::SetWarningCode ( Result::nResultType  nRT,
const 1::vector< ObjectHistoryID > &  aHistoryObjectIDs 
)

Sets the warning code.

If aHistoryObjectIDs is not empty, these ID(s) are used to provide additional information for the error about associated WSM Objects.


The documentation for this class was generated from the following file: