FormIt Plugin API
v23.0.0 (2023.0.0)
|
Functions | |
json | FormIt.GetSnap () |
Get snapping state. More... | |
json | FormIt.SetSnap (bSnap) |
Set snapping state. More... | |
json | FormIt.GetTouchEnabled () |
Are touch interactions enabled? More... | |
json | FormIt.SetTouchEnabled (bTouchEnabled) |
Enable touch interactions. More... | |
json | FormIt.ImportFile (sFileName, bGroupImport, nHistoryID, bKeepLevelsWhenGrouping) |
Imports the content of the given file. More... | |
json | FormIt.OpenFile (sFileName) |
Open the given file. More... | |
json | FormIt.LoadPreviewImage (sFileName) |
Load preview image of the given file. More... | |
json | FormIt.SaveFile (sFileName, saveOptions, previewImage, forSave) |
Save the current model to the given file name. More... | |
json | FormIt.SaveFileForEnergyAnalysis (sFileName) |
Save the current model to the given file name for energy analysis. More... | |
json | FormIt.SetGeoLocationData (geodata) |
SetGeoLocationData() function. More... | |
json | FormIt.SetRenderData (renderdata) |
SetRenderData() function. More... | |
json | FormIt.GetTimeNow () |
Get the time. More... | |
json | FormIt.NewFile (forced) |
Run the new file method. More... | |
json | FormIt.Version () |
Get the version of FormIt. More... | |
json | FormIt.SetCurveAccuracyOrCountDefault (accuracyORcount) |
Set the curve accuracy for the application. More... | |
json | FormIt.GetCurveAccuracyOrCountDefault () |
Get the curve accuracy for the application. More... | |
json | FormIt.SetSurfaceAccuracyOrCountDefault (accuracyORcount) |
Set the surface accuracy for the application. More... | |
json | FormIt.GetSurfaceAccuracyOrCountDefault () |
Get the surface accuracy for the application. More... | |
json | FormIt.GetAccuracyForQuarterCircle (accuracy) |
Get the accuracy for a quarter circle to be used to call SetCurveAccuracyOrCountDefault/SetSurfaceAccuracyOrCountDefault. More... | |
json | FormIt.GetUnitTypeDefault () |
Get the Application (as opposed to Model) UnitType. More... | |
json | FormIt.SetUnitTypeDefault (unitType) |
Set the Application (as opposed to Model) UnitType. More... | |
json | FormIt.IsWSRAvailable () |
IsWSRAvailable() function. More... | |
json | FormIt.SuspendMessaging (bSuppress, nTopLevelHistory, bFullUpdate) |
SuspendMessaging suspends all update messages from WSM until ResumeMessaging is called. More... | |
json | FormIt.ResumeMessaging () |
Resumes messaging that was suspended by a call to SuspendMessaging. More... | |
json | FormIt.ChangeTargetBuildableArea (value) |
ChangeTargetBuildableArea() function. More... | |
json | FormIt.GetBuildingType () |
GetBuildingType() function. More... | |
json | FormIt.SetBuildingType (value) |
SetBuildingType() function. More... | |
json | FormIt.WriteAppDefaultContentToFile (id, path) |
WriteAppDefaultContentToFile() function. More... | |
json | FormIt.DeleteImage (nHistoryID, imageID) |
DeleteImage() function. More... | |
json | FormIt.HandleHUDTextInput (dimensionID, inputText) |
HandleHUDTextInput will handle the HUD input values Parameters: In: dimensionID Out: Boolean. More... | |
json | FormIt.GetAppDefaultContentsWithoutAXM () |
GetAppDefaultContentsWithoutAXM() function. More... | |
json | FormIt.SetKeyboardShortcutsEnabled (enabled) |
SetKeyboardShortcutsEnabled Enables/Disables Keyboard Shortcuts Parameters: In: enabled Out: JSON_UNDEFINED. More... | |
json | FormIt.GetShowEditableDimensions () |
GetShowEditableDimensions returns true if editable dimensions are being displayed. More... | |
json | FormIt.SetShowEditableDimensions (show) |
SetShowEditableDimensions sets if editable dimensions are being displayed. More... | |
json | FormIt.GetVersion () |
Retrieve the FormIt version number Parameters Out: FormIt.Version. More... | |
json | FormIt.FindLatestVersion (versionJsonString, testVersion) |
Retrieve the latest version string from a plugin versions.json file passed as a string Parameters In: versionJsonString Out: The version json obj of the plugin to load. More... | |
json | FormIt.ImportToGroup (sFileType, sFilePath) |
Import to a Group Parameters: In: string In: string Out: HistoryID. More... | |
json | FormIt.CallJS (funcName, paramsJSON) |
Execute the given function with the given params Parameters function, params (json) Out: string. More... | |
json | FormIt.SetLocaleForWeb (nameCode) |
Set the Locale for web client given locale type Parameters In string localType Out: undefined. More... | |
json | FormIt.ConsoleLog (msg) |
Log the given msg to the FormIt console. More... | |
json | FormIt.SetSendToRevitPreview (enabled) |
Set the Send to Revit preview mode state. More... | |
json | FormIt.GetSendToRevitPreview () |
Get the Send to Revit preview mode state. More... | |
json | FormIt.SetNoInferenceSmoothEdgesAndPoints (enabled) |
Set the "No inferencing smooth edges and vertices" mode. More... | |
json | FormIt.GetNoInferenceSmoothEdgesAndPoints () |
Get the "No inferencing smooth edges and vertices" mode. More... | |
json | FormIt.GetAsyncAPI () |
Get the FormItAsync API. More... | |
json | FormIt.RegisterAsyncAPI (NameSpace, APIName, Params) |
Register the given function for the async API For example: FormIt.RegisterAsyncAPI("HelloBlockAsync", "CreateBlock", "l, w, h"); This will expose an async API on the web side that can be called like: var result = await HelloBlockAsync.CreateBlock(l, w, h);. More... | |
json FormIt.CallJS | ( | funcName | , |
paramsJSON | |||
) |
Execute the given function with the given params Parameters function, params (json) Out: string.
[in] | funcName | String |
[in] | paramsJSON | json |
json FormIt.ChangeTargetBuildableArea | ( | value | ) |
json FormIt.ConsoleLog | ( | msg | ) |
Log the given msg to the FormIt console.
Parameters msg Out: JSON_UNDEFINED
[in] | msg | String |
json FormIt.DeleteImage | ( | nHistoryID | , |
imageID | |||
) |
json FormIt.FindLatestVersion | ( | versionJsonString | , |
testVersion | |||
) |
Retrieve the latest version string from a plugin versions.json file passed as a string Parameters In: versionJsonString Out: The version json obj of the plugin to load.
[in] | versionJsonString | json |
[in] | testVersion | (OPTIONAL) FormIt.Version |
json FormIt.GetAccuracyForQuarterCircle | ( | accuracy | ) |
Get the accuracy for a quarter circle to be used to call SetCurveAccuracyOrCountDefault/SetSurfaceAccuracyOrCountDefault.
[in] | accuracy |
|
[in] | accuracy | double |
json FormIt.GetAppDefaultContentsWithoutAXM | ( | ) |
GetAppDefaultContentsWithoutAXM() function.
json FormIt.GetAsyncAPI | ( | ) |
Get the FormItAsync API.
json FormIt.GetBuildingType | ( | ) |
GetBuildingType() function.
json FormIt.GetCurveAccuracyOrCountDefault | ( | ) |
Get the curve accuracy for the application.
File->New will use this value.
json FormIt.GetNoInferenceSmoothEdgesAndPoints | ( | ) |
Get the "No inferencing smooth edges and vertices" mode.
json FormIt.GetSendToRevitPreview | ( | ) |
Get the Send to Revit preview mode state.
json FormIt.GetShowEditableDimensions | ( | ) |
GetShowEditableDimensions returns true if editable dimensions are being displayed.
Parameters: Out: bool
json FormIt.GetSnap | ( | ) |
Get snapping state.
json FormIt.GetSurfaceAccuracyOrCountDefault | ( | ) |
Get the surface accuracy for the application.
File->New will use this value.
json FormIt.GetTimeNow | ( | ) |
Get the time.
json FormIt.GetTouchEnabled | ( | ) |
Are touch interactions enabled?
json FormIt.GetUnitTypeDefault | ( | ) |
json FormIt.GetVersion | ( | ) |
Retrieve the FormIt version number Parameters Out: FormIt.Version.
json FormIt.HandleHUDTextInput | ( | dimensionID | , |
inputText | |||
) |
HandleHUDTextInput will handle the HUD input values Parameters: In: dimensionID Out: Boolean.
[in] | dimensionID | int |
[in] | inputText | String |
json FormIt.ImportFile | ( | sFileName | , |
bGroupImport | , | ||
nHistoryID | , | ||
bKeepLevelsWhenGrouping | |||
) |
Imports the content of the given file.
If nHistoryID is provided import into that History, otherwise use the editing History. If bGroupImport is true, all top level objects are used to create a group and an instance of that group is placed in the history. Section planes, images, unused layers, unused materials and unused textures are not kept. Levels are not kept, unless bKeepLevelsWhenGrouping is also true. If bGroupImport is false, all top level objects are placed directly in the history and all object types from the imported file are kept.
[in] | sFileName | String |
[in] | bGroupImport | bool Group imported file (OPTIONAL) |
[in] | nHistoryID | History to import into (OPTIONAL) |
[in] | bKeepLevels | bool if true levels are imported as well when bGroupImport is true. (OPTIONAL) |
[in] | bKeepLevelsWhenGrouping | (OPTIONAL, default = false) bool |
json FormIt.ImportToGroup | ( | sFileType | , |
sFilePath | |||
) |
Import to a Group Parameters: In: string In: string Out: HistoryID.
[in] | sFileType | String |
[in] | sFilePath | String |
json FormIt.IsWSRAvailable | ( | ) |
IsWSRAvailable() function.
json FormIt.LoadPreviewImage | ( | sFileName | ) |
Load preview image of the given file.
[in] | sFileName | String |
[in] | sFileName | String |
json FormIt.NewFile | ( | forced | ) |
Run the new file method.
[in] | forced | If its forced (OPTIONAL) |
json FormIt.OpenFile | ( | sFileName | ) |
Open the given file.
[in] | sFileName | String |
json FormIt.RegisterAsyncAPI | ( | NameSpace | , |
APIName | , | ||
Params | |||
) |
Register the given function for the async API For example: FormIt.RegisterAsyncAPI("HelloBlockAsync", "CreateBlock", "l, w, h"); This will expose an async API on the web side that can be called like: var result = await HelloBlockAsync.CreateBlock(l, w, h);.
[in] | NameSpace | String |
[in] | APIName | String |
[in] | Params | String |
json FormIt.ResumeMessaging | ( | ) |
Resumes messaging that was suspended by a call to SuspendMessaging.
json FormIt.SaveFile | ( | sFileName | , |
saveOptions | , | ||
previewImage | , | ||
forSave | |||
) |
Save the current model to the given file name.
[in] | sFileName | String |
[in] | saveOptions | (OPTIONAL) FormIt.SaveOptions.AllObjectsWithHistory (default) |
[in] | previewImage | (OPTIONAL) The preview image. |
[in] | forSave | (OPTIONAL) set to true if doing a real save (not Export or Save A Copy As) FormIt.SaveOptions- FormIt.SaveOptions.AllObjects FormIt.SaveOptions.AllObjectsWithHistory FormIt.SaveOptions.VisibleOnly FormIt.SaveOptions.SelectedOnly FormIt.SaveOptions.SelectedOnlyWorldCoords |
json FormIt.SaveFileForEnergyAnalysis | ( | sFileName | ) |
Save the current model to the given file name for energy analysis.
The saved model will include only visible objects, all bodies will be merged, and no materials will be saved. This is not a "real" save, so the modified project flag will not be reset.
[in] | sFileName | String |
json FormIt.SetBuildingType | ( | value | ) |
json FormIt.SetCurveAccuracyOrCountDefault | ( | accuracyORcount | ) |
Set the curve accuracy for the application.
File->New will use this value.
[in] | accuracyORcount |
|
[in] | accuracyORcount | double |
json FormIt.SetGeoLocationData | ( | geodata | ) |
json FormIt.SetKeyboardShortcutsEnabled | ( | enabled | ) |
SetKeyboardShortcutsEnabled Enables/Disables Keyboard Shortcuts Parameters: In: enabled Out: JSON_UNDEFINED.
[in] | enabled | bool |
json FormIt.SetLocaleForWeb | ( | nameCode | ) |
Set the Locale for web client given locale type Parameters In string localType Out: undefined.
[in] | nameCode | String |
json FormIt.SetNoInferenceSmoothEdgesAndPoints | ( | enabled | ) |
Set the "No inferencing smooth edges and vertices" mode.
[in] | enabled |
json FormIt.SetRenderData | ( | renderdata | ) |
json FormIt.SetSendToRevitPreview | ( | enabled | ) |
Set the Send to Revit preview mode state.
[in] | enabled |
json FormIt.SetShowEditableDimensions | ( | show | ) |
SetShowEditableDimensions sets if editable dimensions are being displayed.
Parameters: In: show Out: JSON_UNDEFINED
[in] | show | bool |
json FormIt.SetSnap | ( | bSnap | ) |
Set snapping state.
[in] | bSnap | bool |
json FormIt.SetSurfaceAccuracyOrCountDefault | ( | accuracyORcount | ) |
Set the surface accuracy for the application.
File->New will use this value.
[in] | accuracyORcount |
|
[in] | accuracyORcount | double |
json FormIt.SetTouchEnabled | ( | bTouchEnabled | ) |
Enable touch interactions.
[in] | bTouchEnabled | bool |
json FormIt.SetUnitTypeDefault | ( | unitType | ) |
json FormIt.SuspendMessaging | ( | bSuppress | , |
nTopLevelHistory | , | ||
bFullUpdate | |||
) |
SuspendMessaging suspends all update messages from WSM until ResumeMessaging is called.
The top level history ID provided is included in the kLoadComplete message sent upon resume. This tells the receiver of the message into which history the load was done. The bSuppress parameter can be set to false to indicate that the object should not take effect. This is used to allow run-time determination. Parameters: In: bSuppress In: nTopLevelHistory (OPTIONAL) In: bFullUpdate Default to true to update everthing otherwise only the delta might be updated (OPTIONAL) Out: JSON_UNDEFINED
[in] | bSuppress | bool |
[in] | nTopLevelHistory | (OPTIONAL, default = WSM.INVALID_ID) int |
[in] | bFullUpdate | (OPTIONAL, default = true) bool |
json FormIt.Version | ( | ) |
Get the version of FormIt.
json FormIt.WriteAppDefaultContentToFile | ( | id | , |
path | |||
) |