FormIt Plugin API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
FormIt.Model API

Description

Functions

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

Function Documentation

◆ GetCurveAccuracyOrCountCurrent()

json FormIt.Model.GetCurveAccuracyOrCountCurrent ( )

Get the curve accuracy.

Returns
Curve accuracy

◆ GetGroupHistoryName()

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

◆ GetHistoryID()

json FormIt.Model.GetHistoryID ( )

Get the id of the History of the main Model.

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

Returns
History id

Out: History ID

Returns
WSM.INVALID_ID

◆ GetLinearDefault()

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

n

Parameters
[in]imperialValuedouble
Returns
{...}

◆ GetMemorySize()

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

◆ GetObjectName()

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
{...}

◆ GetProjectSiteArea()

json FormIt.Model.GetProjectSiteArea ( )

Get the project site area of the model

Returns
site area (number)

◆ GetProjectTargetArea()

json FormIt.Model.GetProjectTargetArea ( )

GetProjectTargetArea gets the site project target area of the model.

Returns
area

◆ GetPropertiesForHistory()

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

◆ GetPropertiesForSelected()

json FormIt.Model.GetPropertiesForSelected ( )

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

Returns
{...}

◆ GetSurfaceAccuracyOrCountCurrent()

json FormIt.Model.GetSurfaceAccuracyOrCountCurrent ( )

Get the surface accuracy.

Returns
accuracy (number)

◆ GetTotalGrossArea()

json FormIt.Model.GetTotalGrossArea ( )

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

Returns
area

◆ GetUnitType()

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

◆ GetUnitTypeCurrent()

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

◆ ImperialLengthToCurrentUnitLength()

json FormIt.Model.ImperialLengthToCurrentUnitLength ( length  )

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

Parameters
[in]length

n

Parameters
[in]lengthdouble
Returns
{...}

◆ IsImperialUnitType()

json FormIt.Model.IsImperialUnitType ( unitType  )

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

Parameters
[in]FormIt.UnitType

n

Parameters
[in]unitTypeFormIt.UnitType
Returns
true/false

◆ IsModified()

json FormIt.Model.IsModified ( )

IsModified returns true if the Model has been modified.

Returns
Modified bool

◆ ObjectReportsAreaByLevel()

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
{...}

◆ ResetModified()

json FormIt.Model.ResetModified ( )

ResetModified sets the Model to unmodified.

Returns
JSON_UNDEFINED

◆ SetCurveAccuracyOrCountCurrent()

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

◆ SetGroupHistoryName()

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

◆ SetObjectName()

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. {}

◆ SetSurfaceAccuracyOrCountCurrent()

json FormIt.Model.SetSurfaceAccuracyOrCountCurrent ( accuracy  )

Set the surface accuracy.

Parameters
[in]accuracy
[in]accuracydouble
Returns
JSON_UNDEFINED

◆ SetTotalAreaOfSite()

json FormIt.Model.SetTotalAreaOfSite ( area  )

SetTotalAreaOfSite sets the total site area of the model.

Parameters
[in]area
[in]areadouble
Returns
JSON_UNDEFINED

◆ SetUnitType()

json FormIt.Model.SetUnitType ( unitType  )

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

Parameters
[in]FormIt.UnitType

n FormIt.UnitType.kImperialFeetInches
FormIt.UnitType.kImperialInches
FormIt.UnitType.kMetricMeter
FormIt.UnitType.kMetricCentimeter
FormIt.UnitType.kMetricMillimeter

Parameters
[in]unitTypeFormIt.UnitType
Returns
JSON_UNDEFINED

◆ SetUnitTypeCurrent()

json FormIt.Model.SetUnitTypeCurrent ( unitType  )

Set the UnitType of the current Model.

Parameters
[in]FormIt.UnitType

n FormIt.UnitType.kImperialFeetInches
FormIt.UnitType.kImperialInches
FormIt.UnitType.kMetricMeter
FormIt.UnitType.kMetricCentimeter
FormIt.UnitType.kMetricMillimeter

Parameters
[in]unitTypeFormIt.UnitType
Returns
JSON_UNDEFINED