FormIt C++ API  v23.0.0 (2023.0.0)
FormIt::Model API

Description

Get the id of the History of the main Model.

GetHistoryID() function.

Functions

FORMIT_CORE_EXPORT size_t FormIt::Model::GetHistoryID ()
 
FORMIT_CORE_EXPORT size_t FormIt::Model::GetMemorySize (bool bCollapsedHistoryWithLiveObjsOnly)
 Get the memory size (in bytes) the History of the main Model with all Object versions or collapsed history with only live Objects. More...
 
FORMIT_CORE_EXPORT UnitType FormIt::Model::GetUnitTypeCurrent ()
 Get the UnitType of the current Model. More...
 
FORMIT_CORE_EXPORT bool FormIt::Model::IsImperialUnitType (UnitType unitType)
 Returns true if the given unit type is imperial. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::ImperialLengthToCurrentUnitLength (double imperialValue)
 Takes imperial value in feet and translates to the current unit system. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetUnitTypeCurrent (UnitType type)
 Set the UnitType of the current Model. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetCurveAccuracyOrCountCurrent (double accuracyORcount)
 Set the curve accuracy of the Model. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetCurveAccuracyOrCountCurrent ()
 Get the curve accuracy of the Model. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetSurfaceAccuracyOrCountCurrent (double accuracy)
 Set the surface accuracy of the Model. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetSurfaceAccuracyOrCountCurrent ()
 Get the surface accuracy of the Model. More...
 
FORMIT_CORE_EXPORT::string FormIt::Model::GetGroupHistoryName (size_t nHistoryId)
 Get the name for the given history. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetGroupHistoryName (size_t nHistoryId, const 1::string &sHistoryName)
 Set the name for the given history. More...
 
FORMIT_CORE_EXPORT bool FormIt::Model::IsModified ()
 IsModified returns true if the Model has been modified. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::ResetModified ()
 ResetModified sets the Model to unmodified. More...
 
FORMIT_CORE_EXPORT::string FormIt::Model::GetObjectName (size_t nHistoryID, size_t nObjectID)
 Get the name for the given Object. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetObjectName (size_t nHistoryID, size_t nObjectID, 1::string const &name)
 Set the name for the given Object. More...
 
FORMIT_CORE_EXPORT bool FormIt::Model::ObjectReportsAreaByLevel (size_t nHistoryID, size_t nObjectID)
 Get whether the Object reports area by level or not. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetProjectSiteArea ()
 Get the site area of the model. More...
 
FORMIT_CORE_EXPORT void FormIt::Model::SetTotalAreaOfSite (double area)
 Set the total site area of the model. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetProjectTargetArea ()
 Get the total site area of the model. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetTotalGrossArea ()
 Get the sum of all level areas in the model. More...
 
FORMIT_CORE_EXPORT double FormIt::Model::GetLinearDefault (double imperialValue)
 Get the default value that is equivalent to the given linear imperial value. More...
 

Function Documentation

FORMIT_CORE_EXPORT double FormIt::Model::GetCurveAccuracyOrCountCurrent ( )

Get the curve accuracy of the Model.

FORMIT_CORE_EXPORT ::string FormIt::Model::GetGroupHistoryName ( size_t  nHistoryId)

Get the name for the given history.

Uses either the revit info or dynamo info, depending of what kind of group the history is.

Parameters
[in]nHistoryIdID of the given History
FORMIT_CORE_EXPORT size_t FormIt::Model::GetHistoryID ( )
FORMIT_CORE_EXPORT double FormIt::Model::GetLinearDefault ( double  imperialValue)

Get the default value that is equivalent to the given linear imperial value.

If the current unit type is metric the metric equivalent is returned, for example 0.25 meters for 1 foot. If the current unit type is imperial, the value passed in is returned.

Parameters
[in]imperialValue
FORMIT_CORE_EXPORT size_t FormIt::Model::GetMemorySize ( bool  bCollapsedHistoryWithLiveObjsOnly)

Get the memory size (in bytes) the History of the main Model with all Object versions or collapsed history with only live Objects.

Parameters
[in]bCollapsedHistoryWithLiveObjsOnly
FORMIT_CORE_EXPORT ::string FormIt::Model::GetObjectName ( size_t  nHistoryID,
size_t  nObjectID 
)

Get the name for the given Object.

Parameters
[in]nHistoryIDID of the given History
[in]nObjectIDID of the given object
FORMIT_CORE_EXPORT double FormIt::Model::GetProjectSiteArea ( )

Get the site area of the model.

FORMIT_CORE_EXPORT double FormIt::Model::GetProjectTargetArea ( )

Get the total site area of the model.

FORMIT_CORE_EXPORT double FormIt::Model::GetSurfaceAccuracyOrCountCurrent ( )

Get the surface accuracy of the Model.

FORMIT_CORE_EXPORT double FormIt::Model::GetTotalGrossArea ( )

Get the sum of all level areas in the model.

FORMIT_CORE_EXPORT UnitType FormIt::Model::GetUnitTypeCurrent ( )

Get the UnitType of the current Model.

FORMIT_CORE_EXPORT double FormIt::Model::ImperialLengthToCurrentUnitLength ( double  imperialValue)

Takes imperial value in feet and translates to the current unit system.

Parameters
[in]imperialValue
FORMIT_CORE_EXPORT bool FormIt::Model::IsImperialUnitType ( UnitType  unitType)

Returns true if the given unit type is imperial.

Parameters
[in]unitType
FORMIT_CORE_EXPORT bool FormIt::Model::IsModified ( )

IsModified returns true if the Model has been modified.

FORMIT_CORE_EXPORT bool FormIt::Model::ObjectReportsAreaByLevel ( size_t  nHistoryID,
size_t  nObjectID 
)

Get whether the Object reports area by level or not.

Parameters
[in]nHistoryIDID of the given History
[in]nObjectIDID of the given object
FORMIT_CORE_EXPORT void FormIt::Model::ResetModified ( )

ResetModified sets the Model to unmodified.

FORMIT_CORE_EXPORT void FormIt::Model::SetCurveAccuracyOrCountCurrent ( double  accuracyORcount)

Set the curve accuracy of the Model.

Parameters
[in]accuracyORcount
  • MAX distance between base circle and segment as portion of R, if < .75
  • number of divisions (double rounded to int) over 90 degree arc, if >= .75
FORMIT_CORE_EXPORT void FormIt::Model::SetGroupHistoryName ( size_t  nHistoryId,
const 1::string &  sHistoryName 
)

Set the name for the given history.

Uses either the revit info or dynamo info, depending of what kind of group the history is.

Parameters
[in]nHistoryIdID of the given History
[in]sHistoryName
FORMIT_CORE_EXPORT void FormIt::Model::SetObjectName ( size_t  nHistoryID,
size_t  nObjectID,
1::string const &  name 
)

Set the name for the given Object.

The Object type must be- WSM::nBodyType || WSM::nInstanceType || WSM::nMeshType || WSM::nLineMeshType || WSM::nPointMeshType

Parameters
[in]nHistoryIDID of the given History
[in]nObjectIDID of the given object
[in]nameName for the Object
[in]failOnWrongTypeIf any Object is of the wrong type, fail renaming all the Objects
FORMIT_CORE_EXPORT void FormIt::Model::SetSurfaceAccuracyOrCountCurrent ( double  accuracy)

Set the surface accuracy of the Model.

Parameters
[in]accuracy
  • MAX distance between base circle and segment as portion of R, if < .75
  • number of divisions (double rounded to int) over 90 degree arc, if >= .75
FORMIT_CORE_EXPORT void FormIt::Model::SetTotalAreaOfSite ( double  area)

Set the total site area of the model.

Parameters
[in]area
FORMIT_CORE_EXPORT void FormIt::Model::SetUnitTypeCurrent ( UnitType  type)

Set the UnitType of the current Model.

Parameters
[in]typeThe given UnitType enum value