FormIt Plugin API  v23.0.0 (2023.0.0)
FormIt.Model API

Description

Functions

json FormIt.Model.GetHistoryID ()
 Request the id of the history being edited - app supplied. More...
 
json FormIt.Model.GetMemorySize (bCollapsedHistoryWithLiveObjsOnly)
 Get the memory size of the History of the main Model. More...
 
json FormIt.Model.GetUnitTypeCurrent ()
 Get the UnitType of the current Model. More...
 
json FormIt.Model.GetUnitType ()
 !!!!!!!!!!!!!!! Deprecated: Use GetUnitTypeCurrent !!!!!!!!!!!!!!! Get the UnitType of the current Model. More...
 
json FormIt.Model.SetUnitTypeCurrent (unitType)
 Set the UnitType of the current Model. More...
 
json FormIt.Model.ImperialLengthToCurrentUnitLength (length)
 Takes imperial value in feet and translates to the current unit system. More...
 
json FormIt.Model.SetUnitType (unitType)
 !!!!!!!!!!!!!!! Deprecated: Use GetUnitTypeCurrent !!!!!!!!!!!!!!! Set the UnitType of the current Model. More...
 
json FormIt.Model.IsImperialUnitType (unitType)
 Return true if the current unit type in the model is imperial. More...
 
json FormIt.Model.GetGroupHistoryName (nHistoryID)
 Get the name for the given history. More...
 
json FormIt.Model.SetGroupHistoryName (nHistoryID, sHistoryName)
 Set the name for the given history. More...
 
json FormIt.Model.IsModified ()
 IsModified returns true if the Model has been modified. More...
 
json FormIt.Model.ResetModified ()
 ResetModified sets the Model to unmodified. More...
 
json FormIt.Model.SetCurveAccuracyOrCountCurrent (accuracyORcount)
 Set the curve accuracy. More...
 
json FormIt.Model.GetCurveAccuracyOrCountCurrent ()
 Get the curve accuracy. More...
 
json FormIt.Model.GetPropertiesForHistory (nHistoryID, editingPath)
 Get the properties for the given history. More...
 
json FormIt.Model.GetPropertiesForSelected ()
 Returns the properties for all objects currently selected Parameters: In: Out: FormIt.SelectedProperties. More...
 
json FormIt.Model.GetObjectName (objectID)
 Returns the Object's name Parameters: In: objectID (GroupInstancePath || ObjectHistoryID || ObjectID) Out: name (string) More...
 
json FormIt.Model.SetObjectName (objectID, name)
 Sets the Object's name The Object's type must be- WSM.nBodyType || WSM.nInstanceType || WSM.nMeshType || WSM.nLineMeshType || WSM.nPointMeshType Parameters: In: objectID (GroupInstancePath || ObjectHistoryID || ObjectID) Out: JSON_UNDEFINED. More...
 
json FormIt.Model.ObjectReportsAreaByLevel (objectID)
 Get whether the object reports area by level or not. More...
 
json FormIt.Model.SetSurfaceAccuracyOrCountCurrent (accuracy)
 Set the surface accuracy. More...
 
json FormIt.Model.GetSurfaceAccuracyOrCountCurrent ()
 Get the surface accuracy. More...
 
json FormIt.Model.GetProjectSiteArea ()
 Get the project site area of the model. More...
 
json FormIt.Model.SetTotalAreaOfSite (area)
 SetTotalAreaOfSite sets the total site area of the model. More...
 
json FormIt.Model.GetProjectTargetArea ()
 GetProjectTargetArea gets the site project target area of the model. More...
 
json FormIt.Model.GetTotalGrossArea ()
 GetTotalGrossArea gets the total area of all levels in the model. More...
 
json FormIt.Model.GetLinearDefault (imperialValue)
 Get the default value that is equivalent to the given linear imperial value. More...
 

Function Documentation

json FormIt.Model.GetCurveAccuracyOrCountCurrent ( )

Get the curve accuracy.

Returns
Curve accuracy
json FormIt.Model.GetGroupHistoryName ( 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]nHistoryId
[in]nHistoryIDint
Returns
History name
json FormIt.Model.GetHistoryID ( )

Request the id of the history being edited - app supplied.

Out: History ID

Returns
WSM.INVALID_ID
json FormIt.Model.GetLinearDefault ( 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
json FormIt.Model.GetMemorySize ( bCollapsedHistoryWithLiveObjsOnly  )

Get the memory size of the History of the main Model.

Parameters
[in]boolCollapse the History with live Objects only.
[in]bCollapsedHistoryWithLiveObjsOnlybool
Returns
memory size
json FormIt.Model.GetObjectName ( objectID  )

Returns the Object's name Parameters: In: objectID (GroupInstancePath || ObjectHistoryID || ObjectID) Out: name (string)

Parameters
[in]objectIDWSM.Utils.HistoryObjects
Returns
{...}
json FormIt.Model.GetProjectSiteArea ( )

Get the project site area of the model.

Returns
site area (number)
json FormIt.Model.GetProjectTargetArea ( )

GetProjectTargetArea gets the site project target area of the model.

Returns
area
json FormIt.Model.GetPropertiesForHistory ( nHistoryID  ,
editingPath   
)

Get the properties for the given history.

Used when the history represents a group. If editingPath is supplied, look at owning Groups to determine the Revit category.

Parameters
[in]nHistoryId
[in]editingPathWSM.GroupInstancePath (OPTIONAL)
[in]nHistoryIDint
Returns
properties
json FormIt.Model.GetPropertiesForSelected ( )

Returns the properties for all objects currently selected Parameters: In: Out: FormIt.SelectedProperties.

Returns
{...}
json FormIt.Model.GetSurfaceAccuracyOrCountCurrent ( )

Get the surface accuracy.

Returns
accuracy (number)
json FormIt.Model.GetTotalGrossArea ( )

GetTotalGrossArea gets the total area of all levels in the model.

Returns
area
json FormIt.Model.GetUnitType ( )

!!!!!!!!!!!!!!! Deprecated: Use GetUnitTypeCurrent !!!!!!!!!!!!!!! Get the UnitType of the current Model.

Returns
Unit Type-
FormIt.UnitType.kImperialFeetInches
FormIt.UnitType.kImperialInches
FormIt.UnitType.kMetricMeter
FormIt.UnitType.kMetricCentimeter
FormIt.UnitType.kMetricMillimeter
json FormIt.Model.GetUnitTypeCurrent ( )

Get the UnitType of the current Model.

Returns
Unit Type-
FormIt.UnitType.kImperialFeetInches
FormIt.UnitType.kImperialInches
FormIt.UnitType.kMetricMeter
FormIt.UnitType.kMetricCentimeter
FormIt.UnitType.kMetricMillimeter
json FormIt.Model.ImperialLengthToCurrentUnitLength ( length  )

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

Parameters
[in]length
json FormIt.Model.IsImperialUnitType ( unitType  )

Return true if the current unit type in the model is imperial.

Parameters
[in]FormIt.UnitType
json FormIt.Model.IsModified ( )

IsModified returns true if the Model has been modified.

Returns
Modified bool
json FormIt.Model.ObjectReportsAreaByLevel ( objectID  )

Get whether the object reports area by level or not.

Parameters: In: objectID (GroupInstancePath || ObjectHistoryID || ObjectID) Out: bool

Parameters
[in]objectIDWSM.Utils.HistoryObjects
Returns
{...}
json FormIt.Model.ResetModified ( )

ResetModified sets the Model to unmodified.

Returns
JSON_UNDEFINED
json FormIt.Model.SetCurveAccuracyOrCountCurrent ( accuracyORcount  )

Set the curve accuracy.

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
[in]accuracyORcountdouble
Returns
JSON_UNDEFINED
json FormIt.Model.SetGroupHistoryName ( nHistoryID  ,
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]nHistoryID
[in]sHistoryName
Returns
JSON_UNDEFINED
json FormIt.Model.SetObjectName ( objectID  ,
name   
)

Sets the Object's name The Object's type must be- WSM.nBodyType || WSM.nInstanceType || WSM.nMeshType || WSM.nLineMeshType || WSM.nPointMeshType Parameters: In: objectID (GroupInstancePath || ObjectHistoryID || ObjectID) Out: JSON_UNDEFINED.

Parameters
[in]objectIDWSM.Utils.HistoryObjects
[in]nameString
Returns
JSON_UNDEFINED, i.e. {}
json FormIt.Model.SetSurfaceAccuracyOrCountCurrent ( accuracy  )

Set the surface accuracy.

Parameters
[in]accuracy
[in]accuracydouble
Returns
JSON_UNDEFINED
json FormIt.Model.SetTotalAreaOfSite ( area  )

SetTotalAreaOfSite sets the total site area of the model.

Parameters
[in]area
[in]areadouble
Returns
JSON_UNDEFINED
json FormIt.Model.SetUnitType ( unitType  )

!!!!!!!!!!!!!!! Deprecated: Use GetUnitTypeCurrent !!!!!!!!!!!!!!! Set the UnitType of the current Model.

Parameters
[in]FormIt.UnitType
json FormIt.Model.SetUnitTypeCurrent ( unitType  )

Set the UnitType of the current Model.

Parameters
[in]FormIt.UnitType