diff --git a/archicad-addon/Examples/building_material_props.py b/archicad-addon/Examples/building_material_props.py deleted file mode 100644 index c1ce57c..0000000 --- a/archicad-addon/Examples/building_material_props.py +++ /dev/null @@ -1,15 +0,0 @@ -import json -import aclib - -buildMats = aclib.RunCommand ('API.GetAttributesByType', { 'attributeType' : 'BuildingMaterial' }) -buildMatAttrs = aclib.RunCommand ('API.GetBuildingMaterialAttributes', buildMats) -buildMatPhysProps = aclib.RunTapirCommand ('GetBuildingMaterialPhysicalProperties', buildMats) -for i in range (0, len (buildMatAttrs['attributes'])): - attrs = buildMatAttrs['attributes'][i] - props = buildMatPhysProps['properties'][i] - print (attrs['buildingMaterialAttribute']['name']) - print ('\t' + str (props['properties']['thermalConductivity'])) - print ('\t' + str (props['properties']['density'])) - print ('\t' + str (props['properties']['heatCapacity'])) - print ('\t' + str (props['properties']['embodiedEnergy'])) - print ('\t' + str (props['properties']['embodiedCarbon'])) diff --git a/archicad-addon/Examples/get_building_material_physical_properties.py b/archicad-addon/Examples/get_building_material_physical_properties.py new file mode 100644 index 0000000..25b529a --- /dev/null +++ b/archicad-addon/Examples/get_building_material_physical_properties.py @@ -0,0 +1,16 @@ +import json +import aclib + +buildMats = aclib.RunCommand ('API.GetAttributesByType', { 'attributeType' : 'BuildingMaterial' }) +print (buildMats) + +commandName = 'GetBuildingMaterialPhysicalProperties' +commandParameters = buildMats + +print ('Command: {commandName}'.format (commandName = commandName)) +print ('Parameters:') +print (json.dumps (commandParameters, indent = 4)) + +response = aclib.RunTapirCommand (commandName, commandParameters) +print ('Response:') +print (json.dumps (response, indent = 4)) diff --git a/archicad-addon/Sources/AddOnMain.cpp b/archicad-addon/Sources/AddOnMain.cpp index 181f49d..8c157bc 100644 --- a/archicad-addon/Sources/AddOnMain.cpp +++ b/archicad-addon/Sources/AddOnMain.cpp @@ -1,8 +1,13 @@ #include "APIEnvir.h" #include "ACAPinc.h" +#include "DGModule.hpp" +#include "DGFolderDialog.hpp" + #include "AddOnVersion.hpp" #include "ResourceIds.hpp" +#include "DeveloperTools.hpp" + #include "ApplicationCommands.hpp" #include "ProjectCommands.hpp" #include "ElementCommands.hpp" @@ -15,6 +20,51 @@ #include "ClassificationCommands.hpp" #include "MigrationHelper.hpp" +static std::vector gCommandGroups; + +template +GSErrCode RegisterCommand (CommandGroup& group, const GS::UniString& version, const GS::UniString& description) +{ + GS::Owner command = GS::NewOwned (); + group.commands.push_back (CommandInfo ( + command->GetName (), + description, + version, + command->GetInputParametersSchema (), + command->GetResponseSchema ()) + ); + + GSErrCode err = ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (command.Pass ()); + if (err != NoError) { + return err; + } + return NoError; +} + + +static void GenerateDocumentation () +{ + DG::FolderDialog folderPicker; + if (folderPicker.Invoke ()) { + GenerateDocumentation (folderPicker.GetFolder (), gCommandGroups); + } +} + +static GSErrCode MenuCommandHandler (const API_MenuParams* menuParams) +{ + switch (menuParams->menuItemRef.menuResID) { + case ID_ADDON_MENU: + switch (menuParams->menuItemRef.itemIndex) { + case ID_ADDON_MENU_GENERATE_DOC: + GenerateDocumentation (); + break; + } + break; + } + + return NoError; +} + API_AddonType CheckEnvironment (API_EnvirParams* envir) { RSGetIndString (&envir->addOnInfo.name, ID_ADDON_INFO, ID_ADDON_INFO_NAME, ACAPI_GetOwnResModule ()); @@ -25,66 +75,225 @@ API_AddonType CheckEnvironment (API_EnvirParams* envir) GSErrCode RegisterInterface (void) { - return NoError; + GSErrCode err = NoError; + + err |= ACAPI_MenuItem_RegisterMenu (ID_ADDON_MENU, 0, MenuCode_UserDef, MenuFlag_Default); + + return err; } GSErrCode Initialize (void) { GSErrCode err = NoError; - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); -#ifdef ServerMainVers_2600 - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); -#endif - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - // Issue management - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); - err |= ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (GS::NewOwned ()); + err |= ACAPI_MenuItem_InstallMenuHandler (ID_ADDON_MENU, MenuCommandHandler); + + { // Application Commands + CommandGroup applicationCommands ("Application Commands"); + err |= RegisterCommand ( + applicationCommands, "0.1.0", + "Retrieves the version of the Tapir Additional JSON Commands Add-On." + ); + err |= RegisterCommand ( + applicationCommands, "0.1.0", + "Retrieves the location of the currently running Archicad executable." + ); + err |= RegisterCommand ( + applicationCommands, "0.1.0", + "Performs a quit operation on the currently running Archicad instance." + ); + err |= RegisterCommand ( + applicationCommands, "1.0.7", + "Returns the type of the current (active) window." + ); + gCommandGroups.push_back (applicationCommands); + } + + { // Project Commands + CommandGroup projectCommands ("Project Commands"); + err |= RegisterCommand ( + projectCommands, "0.1.0", + "Retrieves information about the currently loaded project." + ); + err |= RegisterCommand ( + projectCommands, "0.1.2", + "Retrieves the names and values of all project info fields." + ); + err |= RegisterCommand ( + projectCommands, "0.1.2", + "Sets the value of a project info field." + ); + err |= RegisterCommand ( + projectCommands, "1.0.2", + "Retrieves information about the story sructure of the currently loaded project." + ); + err |= RegisterCommand ( + projectCommands, "0.1.0", + "Gets the file system locations (path) of the hotlink modules. The hotlinks can have tree hierarchy in the project." + ); + err |= RegisterCommand ( + projectCommands, "0.1.0", + "Performs a publish operation on the currently opened project. Only the given publisher set will be published." + ); + gCommandGroups.push_back (projectCommands); + } + + { // Element Commands + CommandGroup elementCommands ("Element Commands"); + err |= RegisterCommand ( + elementCommands, "0.1.0", + "Gets the list of the currently selected elements." + ); + err |= RegisterCommand ( + elementCommands, "1.0.7", + "Tests an elements by the given criterias." + ); + err |= RegisterCommand ( + elementCommands, "1.0.7", + "Gets the details of the given elements (geometry parameters etc)." + ); + err |= RegisterCommand ( + elementCommands, "1.0.6", + "Gets the subelements of the given hierarchical elements." + ); + err |= RegisterCommand ( + elementCommands, "1.0.3", + "Highlights the elements given in the elements array. In case of empty elements array removes all previously set highlights." + ); + err |= RegisterCommand ( + elementCommands, "1.0.2", + "Moves elements with a given vector." + ); + err |= RegisterCommand ( + elementCommands, "1.0.2", + "Gets all the GDL parameters (name, type, value) of the given elements." + ); + err |= RegisterCommand ( + elementCommands, "1.0.2", + "Sets the given GDL parameters of the given elements." + ); + err |= RegisterCommand ( + elementCommands, "1.0.6", + "Returns the property values of the elements for the given property. It works for subelements of hierarchal elements also." + ); + err |= RegisterCommand ( + elementCommands, "1.0.6", + "Sets the property values of elements. It works for subelements of hierarchal elements also." + ); + err |= RegisterCommand ( + elementCommands, "1.0.7", + "Returns the classification of the given elements in the given classification systems. It works for subelements of hierarchal elements also." + ); + err |= RegisterCommand ( + elementCommands, "1.0.7", + "Sets the classifications of elements. In order to set the classification of an element to unclassified, omit the classificationItemId field. It works for subelements of hierarchal elements also." + ); + err |= RegisterCommand ( + elementCommands, "1.0.3", + "Creates Column elements based on the given parameters." + ); + err |= RegisterCommand ( + elementCommands, "1.0.3", + "Creates Slab elements based on the given parameters." + ); + err |= RegisterCommand ( + elementCommands, "1.0.3", + "Creates Object elements based on the given parameters." + ); + gCommandGroups.push_back (elementCommands); + } + + { // Attribute Commands + CommandGroup attributeCommands ("Attribute Commands"); + err |= RegisterCommand ( + attributeCommands, "1.0.3", + "Creates Layer attributes based on the given parameters." + ); + err |= RegisterCommand ( + attributeCommands, "1.0.1", + "Creates Building Material attributes based on the given parameters." + ); + err |= RegisterCommand ( + attributeCommands, "1.0.2", + "Creates Composite attributes based on the given parameters." + ); + err |= RegisterCommand ( + attributeCommands, "0.1.3", + "Retrieves the physical properties of the given Building Materials." + ); + gCommandGroups.push_back (attributeCommands); + } + + { // Library Commands + CommandGroup libraryCommands ("Library Commands"); + err |= RegisterCommand ( + libraryCommands, "1.0.1", + "Gets the list of loaded libraries." + ); + err |= RegisterCommand ( + libraryCommands, "1.0.0", + "Executes the reload libraries command." + ); + gCommandGroups.push_back (libraryCommands); + } + + { // Teamwork Commands + CommandGroup teamworkCommands ("Teamwork Commands"); + err |= RegisterCommand ( + teamworkCommands, "0.1.0", + "Performs a send operation on the currently opened Teamwork project." + ); + err |= RegisterCommand ( + teamworkCommands, "0.1.0", + "Performs a receive operation on the currently opened Teamwork project." + ); + gCommandGroups.push_back (teamworkCommands); + } + + { // Issue Management Commands + CommandGroup issueCommands ("Issue Management Commands"); + err |= RegisterCommand ( + issueCommands, "1.0.2", + "Creates a new issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.2", + "Deletes the specified issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.2", + "Retrieves information about existing issues." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Adds a new comment to the specified issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Retrieves comments information from the specified issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Attaches elements to the specified issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Detaches elements from the specified issue." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Retrieves attached elements of the specified issue, filtered by attachment type." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Exports specified issues to a BCF file." + ); + err |= RegisterCommand ( + issueCommands, "1.0.6", + "Imports issues from the specified BCF file." + ); + gCommandGroups.push_back (issueCommands); + } return err; } diff --git a/archicad-addon/Sources/AttributeCommands.hpp b/archicad-addon/Sources/AttributeCommands.hpp index 4ae46af..462e431 100644 --- a/archicad-addon/Sources/AttributeCommands.hpp +++ b/archicad-addon/Sources/AttributeCommands.hpp @@ -31,7 +31,6 @@ class CreateBuildingMaterialsCommand : public CreateAttributesCommandBase { public: CreateBuildingMaterialsCommand (); -protected: virtual GS::Optional GetInputParametersSchema () const override; virtual void SetTypeSpecificParameters (API_Attribute& attribute, const GS::ObjectState& parameters) const override; }; @@ -40,7 +39,6 @@ class CreateLayersCommand : public CreateAttributesCommandBase { public: CreateLayersCommand (); -protected: virtual GS::Optional GetInputParametersSchema () const override; virtual void SetTypeSpecificParameters (API_Attribute& attribute, const GS::ObjectState& parameters) const override; }; diff --git a/archicad-addon/Sources/ClassificationCommands.cpp b/archicad-addon/Sources/ClassificationCommands.cpp index e9dd765..5c5ac64 100644 --- a/archicad-addon/Sources/ClassificationCommands.cpp +++ b/archicad-addon/Sources/ClassificationCommands.cpp @@ -34,8 +34,17 @@ GS::Optional GetClassificationsOfElementsCommand::GetInputParamet GS::Optional GetClassificationsOfElementsCommand::GetResponseSchema () const { return R"({ - "$ref": "#/ElementClassificationsOrErrors", - "description": "The list of element classification item identifiers. Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects." + "type": "object", + "properties": { + "elementClassifications": { + "$ref": "#/ElementClassificationsOrErrors", + "description": "The list of element classification item identifiers. Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects." + } + }, + "additionalProperties": false, + "required": [ + "elementClassifications" + ] })"; } diff --git a/archicad-addon/Sources/DeveloperTools.cpp b/archicad-addon/Sources/DeveloperTools.cpp new file mode 100644 index 0000000..c2c806f --- /dev/null +++ b/archicad-addon/Sources/DeveloperTools.cpp @@ -0,0 +1,84 @@ +#include "DeveloperTools.hpp" + +#include "SchemaDefinitions.hpp" + +#include "File.hpp" + +CommandInfo::CommandInfo (const GS::UniString& name, const GS::UniString& description, const GS::UniString& version, const GS::Optional& inputScheme, const GS::Optional& outputScheme) : + name (name), + description (description), + version (version), + inputScheme (inputScheme), + outputScheme (outputScheme) +{ +} + +CommandGroup::CommandGroup (const GS::UniString& name) : + name (name), + commands () +{ +} + +static bool WriteStringToFile (const IO::Location& location, const GS::UniString& content) +{ + IO::File file (location, IO::File::OnNotFound::Create); + if (file.Open (IO::File::OpenMode::WriteEmptyMode) != NoError) { + return false; + } + + std::string contentString (content.ToCStr (CC_UTF8).Get ()); + if (file.WriteBin ((char*) contentString.c_str (), (GS::USize) contentString.size ()) != NoError) { + return false; + } + + file.Close (); + return true; +} + +void GenerateDocumentation (const IO::Location& folder, const std::vector& commandGroups) +{ + static const GS::UniString NullString ("null"); + IO::Location commonSchemaLocation = folder; + commonSchemaLocation.AppendToLocal (IO::Name ("common_schema_definitions.js")); + GS::UniString commonSchemaContent = "var gSchemaDefinitions = " + GetCommonSchemaDefinitions () + ";"; + WriteStringToFile (commonSchemaLocation, commonSchemaContent); + + IO::Location commandDefinitionLocation = folder; + commandDefinitionLocation.AppendToLocal (IO::Name ("command_definitions.js")); + GS::UniString commandDefinitionContent = "var gCommands = ["; + for (size_t groupIndex = 0; groupIndex < commandGroups.size (); groupIndex++) { + const CommandGroup& group = commandGroups[groupIndex]; + GS::UniString groupCommandsContent; + for (size_t commandIndex = 0; commandIndex < group.commands.size (); commandIndex++) { + const CommandInfo& command = group.commands[commandIndex]; + groupCommandsContent += GS::UniString::Printf (R"({ + "name": "%T", + "version": "%T", + "description": "%T", + "inputScheme": %T, + "outputScheme": %T + })", + command.name.ToPrintf (), + command.version.ToPrintf (), + command.description.ToPrintf (), + command.inputScheme.HasValue () ? command.inputScheme.Get ().ToPrintf () : NullString.ToPrintf (), + command.outputScheme.HasValue () ? command.outputScheme.Get ().ToPrintf () : NullString.ToPrintf () + ); + if (commandIndex < group.commands.size () - 1) { + groupCommandsContent += ","; + } + } + commandDefinitionContent += GS::UniString::Printf (R"({ + "name": "%T", + "commands": [%T] + })", + group.name.ToPrintf (), + groupCommandsContent.ToPrintf () + ); + if (groupIndex < commandGroups.size () - 1) { + commandDefinitionContent += ","; + } + } + commandDefinitionContent += "];"; + WriteStringToFile (commandDefinitionLocation, commandDefinitionContent); +} diff --git a/archicad-addon/Sources/DeveloperTools.hpp b/archicad-addon/Sources/DeveloperTools.hpp new file mode 100644 index 0000000..a5d7ab4 --- /dev/null +++ b/archicad-addon/Sources/DeveloperTools.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include "MigrationHelper.hpp" +#include "CommandBase.hpp" + +#include "UniString.hpp" +#include "Location.hpp" + +#include +#include + +class CommandInfo +{ +public: + CommandInfo (const GS::UniString& name, const GS::UniString& description, const GS::UniString& version, const GS::Optional& inputScheme, const GS::Optional& outputScheme); + + GS::UniString name; + GS::UniString description; + GS::UniString version; + GS::Optional inputScheme; + GS::Optional outputScheme; +}; + +class CommandGroup +{ +public: + CommandGroup (const GS::UniString& name); + + GS::UniString name; + std::vector commands; +}; + +void GenerateDocumentation (const IO::Location& folder, const std::vector& commandGroups); diff --git a/archicad-addon/Sources/ElementCommands.cpp b/archicad-addon/Sources/ElementCommands.cpp index 048c5b5..1f9978f 100644 --- a/archicad-addon/Sources/ElementCommands.cpp +++ b/archicad-addon/Sources/ElementCommands.cpp @@ -1330,8 +1330,6 @@ GS::ObjectState FilterElementsCommand::Execute (const GS::ObjectState& parameter return response; } -#ifdef ServerMainVers_2600 - HighlightElementsCommand::HighlightElementsCommand () : CommandBase (CommonSchema::Used) { @@ -1390,6 +1388,8 @@ GS::Optional HighlightElementsCommand::GetResponseSchema () const return {}; } +#ifdef ServerMainVers_2600 + static API_RGBAColor GetRGBAColorFromArray (const GS::Array& color) { return API_RGBAColor { @@ -1455,4 +1455,11 @@ GS::ObjectState HighlightElementsCommand::Execute (const GS::ObjectState& parame return {}; } -#endif +#else + +GS::ObjectState HighlightElementsCommand::Execute (const GS::ObjectState& /*parameters*/, GS::ProcessControl& /*processControl*/) const +{ + return CreateErrorResponse (APIERR_GENERAL, GetName() + " command is not supported for this AC version."); +} + +#endif \ No newline at end of file diff --git a/archicad-addon/Sources/ElementCommands.hpp b/archicad-addon/Sources/ElementCommands.hpp index 6da6594..682e826 100644 --- a/archicad-addon/Sources/ElementCommands.hpp +++ b/archicad-addon/Sources/ElementCommands.hpp @@ -69,8 +69,6 @@ class FilterElementsCommand : public CommandBase virtual GS::ObjectState Execute (const GS::ObjectState& parameters, GS::ProcessControl& processControl) const override; }; -#ifdef ServerMainVers_2600 - class HighlightElementsCommand : public CommandBase { public: @@ -79,6 +77,4 @@ class HighlightElementsCommand : public CommandBase virtual GS::Optional GetInputParametersSchema () const override; virtual GS::Optional GetResponseSchema () const override; virtual GS::ObjectState Execute (const GS::ObjectState& parameters, GS::ProcessControl& processControl) const override; -}; - -#endif +}; \ No newline at end of file diff --git a/archicad-addon/Sources/MigrationHelper.hpp b/archicad-addon/Sources/MigrationHelper.hpp index 1bd685c..af930b6 100644 --- a/archicad-addon/Sources/MigrationHelper.hpp +++ b/archicad-addon/Sources/MigrationHelper.hpp @@ -4,6 +4,9 @@ #ifndef ServerMainVers_2700 +#define ACAPI_MenuItem_RegisterMenu ACAPI_Register_Menu +#define ACAPI_MenuItem_InstallMenuHandler ACAPI_Install_MenuHandler + #define ACAPI_Markup_Create ACAPI_MarkUp_Create #define ACAPI_Markup_Delete ACAPI_MarkUp_Delete #define ACAPI_Markup_GetList ACAPI_MarkUp_GetList @@ -111,7 +114,7 @@ inline GSErrCode ACAPI_ProjectSetting_GetStorySettings (API_StoryInfo* storyInfo return ACAPI_Environment (APIEnv_GetStorySettingsID, storyInfo, nullptr); } -inline GSErrCode ACAPI_LibraryPart_Search (API_LibPart *ancestor, bool createIfMissing, bool onlyPlaceable = false) +inline GSErrCode ACAPI_LibraryPart_Search (API_LibPart* ancestor, bool createIfMissing, bool onlyPlaceable = false) { return ACAPI_LibPart_Search (ancestor, createIfMissing, onlyPlaceable); } diff --git a/archicad-addon/Sources/RINT/AddOn.grc b/archicad-addon/Sources/RINT/AddOn.grc index 08974ae..0bc0aff 100644 --- a/archicad-addon/Sources/RINT/AddOn.grc +++ b/archicad-addon/Sources/RINT/AddOn.grc @@ -4,4 +4,10 @@ 'STR#' ID_ADDON_INFO "Add-on Name and Description" { /* [ 1] */ "Tapir Additional JSON Commands" /* [ 2] */ "Tapir Additional JSON Commands" -} \ No newline at end of file +} + +'STR#' ID_ADDON_MENU "Add-On Menu" { +/* [ ] */ "Tapir" +/* [ ] */ "Developer Tools" +/* [ 1] */ "Generate Documentation" +} diff --git a/archicad-addon/Sources/ResourceIds.hpp b/archicad-addon/Sources/ResourceIds.hpp index 0aa5849..6309879 100644 --- a/archicad-addon/Sources/ResourceIds.hpp +++ b/archicad-addon/Sources/ResourceIds.hpp @@ -1,7 +1,10 @@ #pragma once -#define ID_ADDON_INFO 32000 -#define ID_ADDON_INFO_NAME 1 -#define ID_ADDON_INFO_DESC 2 +#define ID_ADDON_INFO 32000 +#define ID_ADDON_INFO_NAME 1 +#define ID_ADDON_INFO_DESC 2 -#define ID_ADDON_ID 32500 +#define ID_ADDON_MENU 32001 +#define ID_ADDON_MENU_GENERATE_DOC 1 + +#define ID_ADDON_ID 32500 diff --git a/docs/archicad-addon/command_definitions.js b/docs/archicad-addon/command_definitions.js index 3090f3e..944d4b8 100644 --- a/docs/archicad-addon/command_definitions.js +++ b/docs/archicad-addon/command_definitions.js @@ -1,1919 +1,1828 @@ -var gCommands = [ - { - name : 'Application Commands', - commands : [ - { - name : "GetAddOnVersion", - version : "0.1.0", - description : "Retrieves the version of the Tapir Additional JSON Commands Add-On.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Version number in the form of \"1.1.1\".", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "version" - ] - } +var gCommands = [{ + "name": "Application Commands", + "commands": [{ + "name": "GetAddOnVersion", + "version": "0.1.0", + "description": "Retrieves the version of the Tapir Additional JSON Commands Add-On.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Version number in the form of \"1.1.1\".", + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "version" + ] + } + },{ + "name": "GetArchicadLocation", + "version": "0.1.0", + "description": "Retrieves the location of the currently running Archicad executable.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "archicadLocation": { + "type": "string", + "description": "The location of the Archicad executable in the filesystem.", + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "archicadLocation" + ] + } + },{ + "name": "QuitArchicad", + "version": "0.1.0", + "description": "Performs a quit operation on the currently running Archicad instance.", + "inputScheme": null, + "outputScheme": null + },{ + "name": "GetCurrentWindowType", + "version": "1.0.7", + "description": "Returns the type of the current (active) window.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "currentWindowType": { + "$ref": "#/WindowType" + } + }, + "additionalProperties": false, + "required": [ + "currentWindowType" + ] + } + }] + },{ + "name": "Project Commands", + "commands": [{ + "name": "GetProjectInfo", + "version": "0.1.0", + "description": "Retrieves information about the currently loaded project.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "isUntitled": { + "type": "boolean", + "description": "True, if the project is not saved yet." }, - { - name : "GetArchicadLocation", - version : "0.1.0", - description : "Retrieves the location of the currently running Archicad executable.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "archicadLocation": { - "type": "string", - "description": "The location of the Archicad executable in the filesystem.", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "archicadLocation" - ] - } + "isTeamwork": { + "type": "boolean", + "description": "True, if the project is a Teamwork (BIMcloud) project." }, - { - name : "QuitArchicad", - version : "0.1.0", - description : "Performs a quit operation on the currently running Archicad instance.", - inputScheme : null, - outputScheme : null + "projectLocation": { + "type": "string", + "description": "The location of the project in the filesystem or a BIMcloud project reference.", + "minLength": 1 }, - { - name : "GetCurrentWindowType", - version : "1.0.7", - description : "Returns the type of the current (active) window.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "currentWindowType": { - "$ref": "#/WindowType" - } - }, - "additionalProperties": false, - "required": [ - "currentWindowType" - ] - } + "projectPath": { + "type": "string", + "description": "The path of the project. A filesystem path or a BIMcloud server relative path.", + "minLength": 1 + }, + "projectName": { + "type": "string", + "description": "The name of the project.", + "minLength": 1 } + }, + "additionalProperties": false, + "required": [ + "isUntitled", + "isTeamwork" ] - }, - { - name : 'Project Commands', - commands : [ - { - name : "GetProjectInfo", - version : "0.1.0", - description : "Retrieves information about the currently loaded project.", - inputScheme : null, - outputScheme : { + } + },{ + "name": "GetProjectInfoFields", + "version": "0.1.2", + "description": "Retrieves the names and values of all project info fields.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "fields": { + "type": "array", + "description": "A list of project info fields.", + "items": { "type": "object", "properties": { - "isUntitled": { - "type": "boolean", - "description": "True, if the project is not saved yet." - }, - "isTeamwork": { - "type": "boolean", - "description": "True, if the project is a Teamwork (BIMcloud) project." - }, - "projectLocation": { + "projectInfoId": { "type": "string", - "description": "The location of the project in the filesystem or a BIMcloud project reference.", - "minLength": 1 + "description": "The id of the project info field." }, - "projectPath": { + "projectInfoName": { "type": "string", - "description": "The path of the project. A filesystem path or a BIMcloud server relative path.", - "minLength": 1 + "description": "The name of the project info field visible on UI." }, - "projectName": { + "projectInfoValue": { "type": "string", - "description": "The name of the project.", - "minLength": 1 + "description": "The value of the project info field." } - }, - "additionalProperties": false, - "required": [ - "isUntitled", - "isTeamwork" - ] + } } + } + }, + "additionalProperties": false, + "required": [ + "fields" + ] + } + },{ + "name": "SetProjectInfoField", + "version": "0.1.2", + "description": "Sets the value of a project info field.", + "inputScheme": { + "type": "object", + "properties": { + "projectInfoId": { + "type": "string", + "description": "The id of the project info field.", + "minLength": 1 }, - { - name : "GetProjectInfoFields", - version : "0.1.2", - description : "Retrieves the names and values of all project info fields.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "fields": { - "type": "array", - "description": "A list of project info fields.", - "items": { - "type": "object", - "properties": { - "projectInfoId": { - "type": "string", - "description": "The id of the project info field." - }, - "projectInfoName": { - "type": "string", - "description": "The name of the project info field visible on UI." - }, - "projectInfoValue": { - "type": "string", - "description": "The value of the project info field." - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "fields" - ] - } + "projectInfoValue": { + "type": "string", + "description": "The new value of the project info field.", + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "projectInfoId", + "projectInfoValue" + ] + }, + "outputScheme": null + },{ + "name": "GetStoryInfo", + "version": "1.0.2", + "description": "Retrieves information about the story sructure of the currently loaded project.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "firstStory": { + "type": "integer", + "description": "First story index." }, - { - name : "SetProjectInfoField", - version : "0.1.2", - description : "Sets the value of a project info field.", - inputScheme : { - "type": "object", - "properties": { - "projectInfoId": { - "type": "string", - "description": "The id of the project info field.", - "minLength": 1 - }, - "projectInfoValue": { - "type": "string", - "description": "The new value of the project info field.", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "projectInfoId", - "projectInfoValue" - ] - }, - outputScheme : null + "lastStory": { + "type": "integer", + "description": "Last story index." }, - { - name : "GetHotlinks", - version : "0.1.0", - description : "Gets the file system locations (path) of the hotlink modules. The hotlinks can have tree hierarchy in the project.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "hotlinks": { - "$ref": "#/Hotlinks" - } - }, - "additionalProperties": false, - "required": [ - "hotlinks" - ] - } + "actStory": { + "type": "integer", + "description": "Actual (currently visible in 2D) story index." + }, + "skipNullFloor": { + "type": "boolean", + "description": "Floor indices above ground-floor level may start with 1 instead of 0." }, - { - name : "PublishPublisherSet", - version : "0.1.0", - description : "Performs a publish operation on the currently opened project. Only the given publisher set will be published.", - inputScheme : { + "stories": { + "type": "array", + "description": "A list of project stories.", + "items": { "type": "object", "properties": { - "publisherSetName": { - "type": "string", - "description": "The name of the publisher set.", - "minLength": 1 + "index": { + "type": "integer", + "description": "The story index." + }, + "floorId": { + "type": "integer", + "description": "Unique ID of the story." }, - "outputPath": { + "dispOnSections": { + "type": "boolean", + "description": "Story level lines should appear on sections and elevations." + }, + "level": { + "type": "number", + "description": "The story level." + }, + "uName": { "type": "string", - "description": "Full local or LAN path for publishing. Optional, by default the path set in the settings of the publiser set will be used.", - "minLength": 1 + "description": "The name of the story." } }, "additionalProperties": false, "required": [ - "publisherSetName" + "index", + "floorId", + "dispOnSections", + "level", + "uName" ] - }, - outputScheme : null + } + } + }, + "additionalProperties": false, + "required": [ + "firstStory", + "lastStory", + "actStory", + "skipNullFloor", + "stories" + ] + } + },{ + "name": "GetHotlinks", + "version": "0.1.0", + "description": "Gets the file system locations (path) of the hotlink modules. The hotlinks can have tree hierarchy in the project.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "hotlinks": { + "$ref": "#/Hotlinks" + } + }, + "additionalProperties": false, + "required": [ + "hotlinks" + ] + } + },{ + "name": "PublishPublisherSet", + "version": "0.1.0", + "description": "Performs a publish operation on the currently opened project. Only the given publisher set will be published.", + "inputScheme": { + "type": "object", + "properties": { + "publisherSetName": { + "type": "string", + "description": "The name of the publisher set.", + "minLength": 1 }, - { - name : "GetStoryInfo", - version : "1.0.2", - description : "Retrieves information about the story sructure of the currently loaded project.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "firstStory": { - "type": "integer", - "description": "First story index." - }, - "lastStory": { - "type": "integer", - "description": "Last story index." - }, - "actStory": { - "type": "integer", - "description": "Actual (currently visible in 2D) story index." - }, - "skipNullFloor": { - "type": "boolean", - "description": "Floor indices above ground-floor level may start with 1 instead of 0." - }, - "stories": { - "type": "array", - "description": "A list of project stories.", - "items": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "description": "The story index." - }, - "floorId": { - "type": "integer", - "description": "Unique ID of the story." - }, - "dispOnSections": { - "type": "boolean", - "description": "Story level lines should appear on sections and elevations." - }, - "level": { - "type": "number", - "description": "The story level." - }, - "uName": { - "type": "string", - "description": "The name of the story." - } - }, - "additionalProperties": false, - "required": [ - "index", - "floorId", - "dispOnSections", - "level", - "uName" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "firstStory", - "lastStory", - "actStory", - "skipNullFloor", - "stories" - ] - } - } + "outputPath": { + "type": "string", + "description": "Full local or LAN path for publishing. Optional, by default the path set in the settings of the publiser set will be used.", + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "publisherSetName" ] }, - { - name : 'Library Commands', - commands : [ - { - name : "ReloadLibraries", - version : "1.0.0", - description : "Executes the reload libraries command.", - inputScheme : null, - outputScheme : null + "outputScheme": null + }] + },{ + "name": "Element Commands", + "commands": [{ + "name": "GetSelectedElements", + "version": "0.1.0", + "description": "Gets the list of the currently selected elements.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + } + },{ + "name": "FilterElements", + "version": "1.0.7", + "description": "Tests an elements by the given criterias.", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" }, - { - name : "GetLibraries", - version : "1.0.1", - description : "Gets the list of loaded libraries.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "libraries": { - "type": "array", - "description": "A list of project libraries.", - "items": { - "type": "object", - "description": "Library", - "properties": { - "name": { - "type": "string", - "description": "Library name." - }, - "path": { - "type": "string", - "description": "A filesystem path to library location." - }, - "type": { - "type": "string", - "description": "Library type." - }, - "available": { - "type": "boolean", - "description": "Is library not missing." - }, - "readOnly": { - "type": "boolean", - "description": "Is library not writable." - }, - "twServerUrl": { - "type": "string", - "description": "URL address of the TeamWork server hosting the library." - }, - "urlWebLibrary": { - "type": "string", - "description": "URL of the downloaded Internet library." - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "path" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "libraries" - ] - } + "filters": { + "type": "array", + "items": { + "$ref": "#/ElementFilter" + }, + "minItems": 1 } + }, + "additionalProperties": false, + "required": [ + "elements" ] }, - { - name : 'Element Commands', - commands : [ - { - name : "GetSelectedElements", - version : "0.1.0", - description : "Gets the list of the currently selected elements.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - } - }, - { - name : "FilterElements", - version : "1.0.7", - description : "Tests an elements by the given criterias.", - inputScheme : { + "outputScheme": { + "type": "object", + "properties": { + "filteredElements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "filteredElements" + ] + } + },{ + "name": "GetDetailsOfElements", + "version": "1.0.7", + "description": "Gets the details of the given elements (geometry parameters etc).", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "detailsOfElements": { + "type": "array", + "items": { "type": "object", + "description": "Details of an element.", "properties": { - "elements": { - "$ref": "#/Elements" + "type": { + "$ref": "#/ElementType" }, - "filters": { - "type": "array", - "items": { - "$ref": "#/ElementFilter" - }, - "minItems": 1 - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "filteredElements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "filteredElements" - ] - } - }, - { - name : "GetDetailsOfElementsCommand", - version : "1.0.7", - description : "Gets the details of the given elements (geometry parameters etc).", - inputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "detailsOfElements": { - "type": "array", - "items": { - "type": "object", - "description": "Details of an element.", - "properties": { - "type": { - "$ref": "#/ElementType" - }, - "floorIndex": { - "type": "number" - }, - "layerIndex": { - "type": "number" - }, - "details": { - "type": "object", - "oneOf": [ - { - "title": "WallDetails", - "properties": { - "geometryType": { - "type": "string", - "enum": [ - "Straight", - "Trapezoid", - "Polygonal" - ] - }, - "begCoordinate": { - "$ref": "#/2DCoordinate" - }, - "endCoordinate": { - "$ref": "#/2DCoordinate" - }, - "height": { - "type": "number", - "description": "height relative to bottom" - }, - "bottomOffset": { - "type": "number", - "description": "base level of the wall relative to the floor level" - }, - "offset": { - "type": "number", - "description": "wall's base line's offset from ref. line" - }, - "begThickness": { - "type": "number", - "description": "Thickness at the beginning in case of trapezoid wall" - }, - "endThickness": { - "type": "number", - "description": "Thickness at the end in case of trapezoid wall" - }, - "polygonOutline": { - "type": "array", - "description": "Polygon outline in case of polygonal wall", - "items": { - "$ref": "#/2DCoordinate" - } - } - }, - "required": [ - "geometryType", - "begCoordinate", - "endCoordinate", - "height", - "bottomOffset", - "offset" - ] - }, - { - "title": "ColumnDetails", - "properties": { - "origin": { - "$ref": "#/2DCoordinate" - }, - "height": { - "type": "number", - "description": "height relative to bottom" - }, - "bottomOffset": { - "type": "number", - "description": "base level of the column relative to the floor level" - } - }, - "required": [ - "origin", - "height", - "bottomOffset" - ] - }, - { - "title": "NotYetSupportedElementTypeDetails", - "properties": { - "error": { - "type": "string" - } - }, - "required": [ - "error" - ] + "floorIndex": { + "type": "number" + }, + "layerIndex": { + "type": "number" + }, + "details": { + "type": "object", + "oneOf": [ + { + "title": "WallDetails", + "properties": { + "geometryType": { + "type": "string", + "enum": [ + "Straight", + "Trapezoid", + "Polygonal" + ] + }, + "begCoordinate": { + "$ref": "#/2DCoordinate" + }, + "endCoordinate": { + "$ref": "#/2DCoordinate" + }, + "height": { + "type": "number", + "description": "height relative to bottom" + }, + "bottomOffset": { + "type": "number", + "description": "base level of the wall relative to the floor level" + }, + "offset": { + "type": "number", + "description": "wall's base line's offset from ref. line" + }, + "begThickness": { + "type": "number", + "description": "Thickness at the beginning in case of trapezoid wall" + }, + "endThickness": { + "type": "number", + "description": "Thickness at the end in case of trapezoid wall" + }, + "polygonOutline": { + "type": "array", + "description": "Polygon outline in case of polygonal wall", + "items": { + "$ref": "#/2DCoordinate" } - ] - } - }, - "required": [ - "type", - "floorIndex", - "layerIndex", - "details" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "detailsOfElements" - ] - } - }, - { - name : "GetSubelementsOfHierarchicalElements", - version : "1.0.6", - description : "Gets the subelements of the given hierarchical elements.", - inputScheme : { - "type": "object", - "properties": { - "hierarchicalElements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "hierarchicalElements" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "subelementsOfHierarchicalElements": { - "type": "array", - "items": { - "type": "object", - "description": "Subelements grouped by type.", - "properties": { - "cWallSegments": { - "$ref": "#/Elements" - }, - "cWallFrames": { - "$ref": "#/Elements" - }, - "cWallPanels": { - "$ref": "#/Elements" - }, - "cWallJunctions": { - "$ref": "#/Elements" - }, - "cWallAccessories": { - "$ref": "#/Elements" - }, - "stairRisers": { - "$ref": "#/Elements" - }, - "stairTreads": { - "$ref": "#/Elements" - }, - "stairStructures": { - "$ref": "#/Elements" - }, - "railingNodes": { - "$ref": "#/Elements" - }, - "railingSegments": { - "$ref": "#/Elements" - }, - "railingPosts": { - "$ref": "#/Elements" - }, - "railingRailEnds": { - "$ref": "#/Elements" - }, - "railingRailConnections": { - "$ref": "#/Elements" - }, - "railingHandrailEnds": { - "$ref": "#/Elements" - }, - "railingHandrailConnections": { - "$ref": "#/Elements" - }, - "railingToprailEnds": { - "$ref": "#/Elements" - }, - "railingToprailConnections": { - "$ref": "#/Elements" - }, - "railingRails": { - "$ref": "#/Elements" - }, - "railingToprails": { - "$ref": "#/Elements" - }, - "railingHandrails": { - "$ref": "#/Elements" - }, - "railingPatterns": { - "$ref": "#/Elements" - }, - "railingInnerPosts": { - "$ref": "#/Elements" - }, - "railingPanels": { - "$ref": "#/Elements" - }, - "railingBalusterSets": { - "$ref": "#/Elements" + } }, - "railingBalusters": { - "$ref": "#/Elements" + "required": [ + "geometryType", + "begCoordinate", + "endCoordinate", + "height", + "bottomOffset", + "offset" + ] + }, + { + "title": "ColumnDetails", + "properties": { + "origin": { + "$ref": "#/2DCoordinate" + }, + "height": { + "type": "number", + "description": "height relative to bottom" + }, + "bottomOffset": { + "type": "number", + "description": "base level of the column relative to the floor level" + } }, - "beamSegments": { - "$ref": "#/Elements" + "required": [ + "origin", + "height", + "bottomOffset" + ] + }, + { + "title": "NotYetSupportedElementTypeDetails", + "properties": { + "error": { + "type": "string" + } }, - "columnSegments": { - "$ref": "#/Elements" - } + "required": [ + "error" + ] } - } + ] } }, - "additionalProperties": false, "required": [ - "subelementsOfHierarchicalElements" + "type", + "floorIndex", + "layerIndex", + "details" ] } - }, - { - name : "HighlightElements", - version : "1.0.3", - description : "Highlights the elements given in the elements array. In case of empty elements array removes all previously set highlights.", - inputScheme : { + } + }, + "additionalProperties": false, + "required": [ + "detailsOfElements" + ] + } + },{ + "name": "GetSubelementsOfHierarchicalElements", + "version": "1.0.6", + "description": "Gets the subelements of the given hierarchical elements.", + "inputScheme": { + "type": "object", + "properties": { + "hierarchicalElements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "hierarchicalElements" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "subelementsOfHierarchicalElements": { + "type": "array", + "items": { "type": "object", + "description": "Subelements grouped by type.", "properties": { - "elements": { + "cWallSegments": { "$ref": "#/Elements" }, - "highlightedColors": { - "type": "array", - "description": "A list of colors to highlight elements.", - "items": { - "type": "array", - "description": "Color of the highlighted element as an [r, g, b, a] array. Each component must be in the 0-255 range.", - "items": { - "type": "integer" - }, - "minItems": 4, - "maxItems": 4 - } + "cWallFrames": { + "$ref": "#/Elements" }, - "wireframe3D": { - "type": "boolean", - "description" : "Optional parameter. Switch non highlighted elements in the 3D window to wireframe." + "cWallPanels": { + "$ref": "#/Elements" }, - "nonHighlightedColor": { - "type": "array", - "description": "Optional parameter. Color of the non highlighted elements as an [r, g, b, a] array. Each component must be in the 0-255 range.", - "items": { - "type": "integer" - }, - "minItems": 4, - "maxItems": 4 + "cWallJunctions": { + "$ref": "#/Elements" + }, + "cWallAccessories": { + "$ref": "#/Elements" + }, + "stairRisers": { + "$ref": "#/Elements" + }, + "stairTreads": { + "$ref": "#/Elements" + }, + "stairStructures": { + "$ref": "#/Elements" + }, + "railingNodes": { + "$ref": "#/Elements" + }, + "railingSegments": { + "$ref": "#/Elements" + }, + "railingPosts": { + "$ref": "#/Elements" + }, + "railingRailEnds": { + "$ref": "#/Elements" + }, + "railingRailConnections": { + "$ref": "#/Elements" + }, + "railingHandrailEnds": { + "$ref": "#/Elements" + }, + "railingHandrailConnections": { + "$ref": "#/Elements" + }, + "railingToprailEnds": { + "$ref": "#/Elements" + }, + "railingToprailConnections": { + "$ref": "#/Elements" + }, + "railingRails": { + "$ref": "#/Elements" + }, + "railingToprails": { + "$ref": "#/Elements" + }, + "railingHandrails": { + "$ref": "#/Elements" + }, + "railingPatterns": { + "$ref": "#/Elements" + }, + "railingInnerPosts": { + "$ref": "#/Elements" + }, + "railingPanels": { + "$ref": "#/Elements" + }, + "railingBalusterSets": { + "$ref": "#/Elements" + }, + "railingBalusters": { + "$ref": "#/Elements" + }, + "beamSegments": { + "$ref": "#/Elements" + }, + "columnSegments": { + "$ref": "#/Elements" } - }, - "additionalProperties": false, - "required": [ - "elements", - "highlightedColors" - ] - }, - outputScheme : null + } + } + } + }, + "additionalProperties": false, + "required": [ + "subelementsOfHierarchicalElements" + ] + } + },{ + "name": "HighlightElements", + "version": "1.0.3", + "description": "Highlights the elements given in the elements array. In case of empty elements array removes all previously set highlights.", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" }, - { - name : "MoveElements", - version : "1.0.2", - description : "Moves elements with a given vector.", - inputScheme : { - "type": "object", - "properties": { - "elementsWithMoveVectors": { - "type": "array", - "description": "The elements with move vector pairs.", - "items": { - "type": "object", - "properties": { - "elementId": { - "$ref": "#/ElementId" - }, - "moveVector": { - "type": "object", - "description" : "3D vector.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the vector." - }, - "y" : { - "type": "number", - "description" : "Y value of the vector." - }, - "z" : { - "type": "number", - "description" : "Z value of the vector." - } - }, - "additionalProperties": false, - "required" : [ - "x", - "y", - "z" - ] - }, - "copy": { - "type": "boolean", - "description" : "Optional parameter. If true, then a copy of the element will be moved. By default it's false." - } - }, - "additionalProperties": false, - "required": [ - "elementId", - "moveVector" - ] - } - } + "highlightedColors": { + "type": "array", + "description": "A list of colors to highlight elements.", + "items": { + "type": "array", + "description": "Color of the highlighted element as an [r, g, b, a] array. Each component must be in the 0-255 range.", + "items": { + "type": "integer" }, - "additionalProperties": false, - "required": [ - "elementsWithMoveVectors" - ] - }, - outputScheme : null + "minItems": 4, + "maxItems": 4 + } }, - { - name : "GetGDLParametersOfElements", - version : "1.0.2", - description : "Get all the GDL parameters (name, type, value) of the given elements.", - inputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "gdlParametersOfElements": { - "type": "array", - "description": "The GDL parameters of elements.", - "items": { - "$ref": "#/GDLParametersDictionary" - } - } - }, - "additionalProperties": false, - "required": [ - "gdlParametersOfElements" - ] - } + "wireframe3D": { + "type": "boolean", + "description" : "Optional parameter. Switch non highlighted elements in the 3D window to wireframe." }, - { - name : "SetGDLParametersOfElements", - version : "1.0.2", - description : "Sets the given GDL parameters of the given elements.", - inputScheme : { - "type": "object", - "properties": { - "elementsWithGDLParameters": { - "type": "array", - "description": "The elements with GDL parameters dictionary pairs.", - "items": { - "type": "object", - "properties": { - "elementId": { - "$ref": "#/ElementId" - }, - "gdlParameters": { - "$ref": "#/GDLParametersDictionary" - } - }, - "additionalProperties": false, - "required": [ - "elementId", - "gdlParameters" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "elementsWithGDLParameters" - ] + "nonHighlightedColor": { + "type": "array", + "description": "Optional parameter. Color of the non highlighted elements as an [r, g, b, a] array. Each component must be in the 0-255 range.", + "items": { + "type": "integer" }, - outputScheme : null + "minItems": 4, + "maxItems": 4 } + }, + "additionalProperties": false, + "required": [ + "elements", + "highlightedColors" ] }, - { - name : 'Element Creation Commands', - commands : [ - { - name : "CreateColumns", - version : "1.0.3", - description : "Creates Column elements based on the given parameters.", - inputScheme : { + "outputScheme": null + },{ + "name": "MoveElements", + "version": "1.0.2", + "description": "Moves elements with a given vector.", + "inputScheme": { + "type": "object", + "properties": { + "elementsWithMoveVectors": { + "type": "array", + "description": "The elements with move vector pairs.", + "items": { "type": "object", "properties": { - "columnsData": { - "type": "array", - "description": "Array of data to create Columns.", - "items": { - "type": "object", - "description": "The parameters of the new Column.", - "properties": { - "coordinates": { - "type": "object", - "description" : "3D coordinate.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the coordinate." - }, - "y" : { - "type": "number", - "description" : "Y value of the coordinate." - }, - "z" : { - "type": "number", - "description" : "Z value of the coordinate." - } - }, - "additionalProperties": false, - "required" : [ - "x", - "y", - "z" - ] - } + "elementId": { + "$ref": "#/ElementId" + }, + "moveVector": { + "type": "object", + "description" : "Move vector of a 3D point.", + "properties" : { + "x": { + "type": "number", + "description" : "X value of the vector." }, - "additionalProperties": false, - "required" : [ - "coordinates" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "columnsData" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" + "y" : { + "type": "number", + "description" : "Y value of the vector." + }, + "z" : { + "type": "number", + "description" : "Z value of the vector." + } + }, + "additionalProperties": false, + "required" : [ + "x", + "y", + "z" + ] + }, + "copy": { + "type": "boolean", + "description" : "Optional parameter. If true, then a copy of the element will be moved. By default it's false." } }, "additionalProperties": false, "required": [ - "elements" + "elementId", + "moveVector" ] } - }, - { - name : "CreateSlabs", - version : "1.0.3", - description : "Creates Slab elements based on the given parameters.", - inputScheme : { - "type": "object", - "properties": { - "slabsData": { - "type": "array", - "description": "Array of data to create Slabs.", - "items": { - "type": "object", - "description" : "The parameters of the new Slab.", - "properties" : { - "level": { - "type": "number", - "description" : "The Z coordinate value of the reference line of the slab." - }, - "polygonCoordinates": { - "type": "array", - "description": "The 2D coordinates of the edge of the slab.", - "items": { - "type": "object", - "description" : "Position of a 2D point.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the point." - }, - "y" : { - "type": "number", - "description" : "Y value of the point." - } - }, - "additionalProperties": false, - "required" : [ - "x", - "y" - ] - } - }, - "holes" : { - "type": "array", - "description": "Array of parameters of holes.", - "items": { - "type": "object", - "description" : "The parameters of the hole.", - "properties" : { - "polygonCoordinates": { - "type": "array", - "description": "The 2D coordinates of the edge of the slab.", - "items": { - "type": "object", - "description" : "Position of a 2D point.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the point." - }, - "y" : { - "type": "number", - "description" : "Y value of the point." - } - }, - "additionalProperties": false, - "required" : [ - "x", - "y" - ] - } - } - }, - "additionalProperties": false, - "required" : [ - "polygonCoordinates" - ] - } - } - }, - "additionalProperties": false, - "required" : [ - "level", - "polygonCoordinates" - ] - } - } + } + }, + "additionalProperties": false, + "required": [ + "elementsWithMoveVectors" + ] + }, + "outputScheme": null + },{ + "name": "GetGDLParametersOfElements", + "version": "1.0.2", + "description": "Gets all the GDL parameters (name, type, value) of the given elements.", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] +}, + "outputScheme": { + "type": "object", + "properties": { + "gdlParametersOfElements": { + "type": "array", + "description": "The GDL parameters of elements.", + "items": { + "$ref": "#/GDLParametersDictionary" + } + } + }, + "additionalProperties": false, + "required": [ + "gdlParametersOfElements" + ] +} + },{ + "name": "SetGDLParametersOfElements", + "version": "1.0.2", + "description": "Sets the given GDL parameters of the given elements.", + "inputScheme": { + "type": "object", + "properties": { + "elementsWithGDLParameters": { + "type": "array", + "description": "The elements with GDL parameters dictionary pairs.", + "items": { + "type": "object", + "properties": { + "elementId": { + "$ref": "#/ElementId" }, - "additionalProperties": false, - "required": [ - "slabsData" - ] + "gdlParameters": { + "$ref": "#/GDLParametersDictionary" + } }, - outputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - } + "additionalProperties": false, + "required": [ + "elementId", + "gdlParameters" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "elementsWithGDLParameters" + ] +}, + "outputScheme": null + },{ + "name": "GetPropertyValuesOfElements", + "version": "1.0.6", + "description": "Returns the property values of the elements for the given property. It works for subelements of hierarchal elements also.", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + }, + "properties": { + "$ref": "#/PropertyIds" + } + }, + "additionalProperties": false, + "required": [ + "elements", + "properties" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "propertyValuesForElements": { + "$ref": "#/PropertyValuesOrErrorArray", + "description": "List of property value lists. The order of the outer list is that of the given elements. The order of the inner lists are that of the given properties." + } + }, + "additionalProperties": false, + "required": [ + "propertyValuesForElements" + ] + } + },{ + "name": "SetPropertyValuesOfElements", + "version": "1.0.6", + "description": "Sets the property values of elements. It works for subelements of hierarchal elements also.", + "inputScheme": { + "type": "object", + "properties": { + "elementPropertyValues": { + "$ref": "#/ElementPropertyValues" + } + }, + "additionalProperties": false, + "required": [ + "elementPropertyValues" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "executionResults": { + "$ref": "#/ExecutionResults" + } + }, + "additionalProperties": false, + "required": [ + "executionResults" + ] + } + },{ + "name": "GetClassificationsOfElements", + "version": "1.0.7", + "description": "Returns the classification of the given elements in the given classification systems. It works for subelements of hierarchal elements also.", + "inputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" }, - { - name : "CreateObjects", - version : "1.0.3", - description : "Creates Object elements based on the given parameters.", - inputScheme : { + "classificationSystemIds": { + "$ref": "#/ClassificationSystemIds" + } + }, + "additionalProperties": false, + "required": [ + "elements", + "classificationSystemIds" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "elementClassifications": { + "$ref": "#/ElementClassificationsOrErrors", + "description": "The list of element classification item identifiers. Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects." + } + }, + "additionalProperties": false, + "required": [ + "elementClassifications" + ] + } + },{ + "name": "SetClassificationsOfElements", + "version": "1.0.7", + "description": "Sets the classifications of elements. In order to set the classification of an element to unclassified, omit the classificationItemId field. It works for subelements of hierarchal elements also.", + "inputScheme": { + "type": "object", + "properties": { + "elementClassifications": { + "$ref": "#/ElementClassifications" + } + }, + "additionalProperties": false, + "required": [ + "elementClassifications" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "executionResults": { + "$ref": "#/ExecutionResults" + } + }, + "additionalProperties": false, + "required": [ + "executionResults" + ] + } + },{ + "name": "CreateColumns", + "version": "1.0.3", + "description": "Creates Column elements based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "columnsData": { + "type": "array", + "description": "Array of data to create Columns.", + "items": { "type": "object", - "properties": { - "objectsData": { - "type": "array", - "description": "Array of data to create Objects.", - "items": { - "type": "object", - "description": "The parameters of the new Object.", - "properties": { - "libraryPartName": { - "type": "string", - "description" : "The name of the library part to use." - }, - "coordinates": { - "$ref": "#/3DCoordinate" - }, - "dimensions": { - "$ref": "#/3DDimensions" - } - }, - "additionalProperties": false, - "required" : [ - "libraryPartName", - "coordinates", - "dimensions" - ] - } + "description": "The parameters of the new Column.", + "properties": { + "coordinates": { + "type": "object", + "description" : "3D coordinate.", + "properties" : { + "x": { + "type": "number", + "description" : "X value of the coordinate." + }, + "y" : { + "type": "number", + "description" : "Y value of the coordinate." + }, + "z" : { + "type": "number", + "description" : "Z value of the coordinate." + } + }, + "additionalProperties": false, + "required" : [ + "x", + "y", + "z" + ] } }, "additionalProperties": false, - "required": [ - "objectsData" + "required" : [ + "coordinates" ] + } + } + }, + "additionalProperties": false, + "required": [ + "columnsData" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + } + },{ + "name": "CreateSlabs", + "version": "1.0.3", + "description": "Creates Slab elements based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "slabsData": { + "type": "array", + "description": "Array of data to create Slabs.", + "items": { + "type": "object", + "description" : "The parameters of the new Slab.", + "properties" : { + "level": { + "type": "number", + "description" : "The Z coordinate value of the reference line of the slab." + }, + "polygonCoordinates": { + "type": "array", + "description": "The 2D coordinates of the edge of the slab.", + "items": { + "$ref": "#/2DCoordinate" + } + }, + "holes" : { + "type": "array", + "description": "Array of parameters of holes.", + "items": { + "type": "object", + "description" : "The parameters of the hole.", + "properties" : { + "polygonCoordinates": { + "type": "array", + "description": "The 2D coordinates of the edge of the slab.", + "items": { + "$ref": "#/2DCoordinate" + } + } + }, + "additionalProperties": false, + "required" : [ + "polygonCoordinates" + ] + } + } }, - outputScheme : { + "additionalProperties": false, + "required" : [ + "level", + "polygonCoordinates" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "slabsData" + ] +}, + "outputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + } + },{ + "name": "CreateObjects", + "version": "1.0.3", + "description": "Creates Object elements based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "objectsData": { + "type": "array", + "description": "Array of data to create Objects.", + "items": { "type": "object", + "description": "The parameters of the new Object.", "properties": { - "elements": { - "$ref": "#/Elements" + "libraryPartName": { + "type": "string", + "description" : "The name of the library part to use." + }, + "coordinates": { + "$ref": "#/3DCoordinate" + }, + "dimensions": { + "$ref": "#/3DDimensions" } }, "additionalProperties": false, - "required": [ - "elements" + "required" : [ + "libraryPartName", + "coordinates", + "dimensions" ] } } + }, + "additionalProperties": false, + "required": [ + "objectsData" ] }, - { - name : 'Attribute Commands', - commands : [ - { - name : "CreateBuildingMaterials", - version : "1.0.1", - description : "Creates Building Material attributes based on the given parameters.", - inputScheme : { - "type": "object", - "properties": { - "buildingMaterialDataArray": { - "type": "array", - "description" : "Array of data to create Building Materials.", - "items": { - "type": "object", - "description": "Data to create a Building Material.", - "properties": { - "name": { - "type": "string", - "description": "Name." - }, - "id": { - "type": "string", - "description": "Identifier." - }, - "manufacturer": { - "type": "string", - "description": "Manufacturer." - }, - "description": { - "type": "string", - "description": "Decription." - }, - "connPriority": { - "type": "integer", - "description": "Intersection priority." - }, - "cutFillIndex": { - "type": "integer", - "description": "Index of the Cut Fill." - }, - "cutFillPen": { - "type": "integer", - "description": "Cut Fill Foreground Pen." - }, - "cutFillBackgroundPen": { - "type": "integer", - "description": "Cut Fill Background Pen." - }, - "cutSurfaceIndex": { - "type": "integer", - "description": "Index of the Cut Surface." - }, - "thermalConductivity": { - "type": "number", - "description": "Thermal Conductivity." - }, - "density": { - "type": "number", - "description": "Density." - }, - "heatCapacity": { - "type": "number", - "description": "Heat Capacity." - }, - "embodiedEnergy": { - "type": "number", - "description": "Embodied Energy." - }, - "embodiedCarbon": { - "type": "number", - "description": "Embodied Carbon." - } - }, - "additionalProperties": false, - "required" : [ - "name" - ] - } - }, - "overwriteExisting": { - "type": "boolean", - "description": "Overwrite the Building Material if exists with the same name. The default is false." - } - }, - "additionalProperties": false, - "required": [ - "buildingMaterialDataArray" - ] - }, - outputScheme : { + "outputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + } + }] + },{ + "name": "Attribute Commands", + "commands": [{ + "name": "CreateLayers", + "version": "1.0.3", + "description": "Creates Layer attributes based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "layerDataArray": { + "type": "array", + "description" : "Array of data to create new Layers.", + "items": { "type": "object", + "description": "Data to create a Layer.", "properties": { - "attributeIds": { - "$ref": "#/AttributeIds" + "name": { + "type": "string", + "description": "Name." + }, + "isHidden": { + "type": "boolean", + "description": "Hide/Show." + }, + "isLocked": { + "type": "boolean", + "description": "Lock/Unlock." + }, + "isWireframe": { + "type": "boolean", + "description": "Force the model to wireframe." } }, "additionalProperties": false, - "required": [ - "attributeIds" + "required" : [ + "name" ] } }, - { - name : "CreateLayers", - version : "1.0.3", - description : "Creates Layer attributes based on the given parameters.", - inputScheme : { - "type": "object", - "properties": { - "layerDataArray": { - "type": "array", - "description" : "Array of data to create Layers.", - "items": { - "type": "object", - "description": "Data to create a Layer.", - "properties": { - "name": { - "type": "string", - "description": "Name." - }, - "isHidden": { - "type": "boolean", - "description": "Hide/Show." - }, - "isLocked": { - "type": "boolean", - "description": "Lock/Unlock." - }, - "isWireframe": { - "type": "boolean", - "description": "Force the model to wireframe." - } - }, - "additionalProperties": false, - "required" : [ - "name" - ] - } - }, - "overwriteExisting": { - "type": "boolean", - "description": "Overwrite the Layer if exists with the same name. The default is false." - } - }, - "additionalProperties": false, - "required": [ - "layerDataArray" - ] - }, - outputScheme : { + "overwriteExisting": { + "type": "boolean", + "description": "Overwrite the Layer if exists with the same name. The default is false." + } + }, + "additionalProperties": false, + "required": [ + "layerDataArray" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "attributeIds": { + "$ref": "#/AttributeIds" + } + }, + "additionalProperties": false, + "required": [ + "attributeIds" + ] + } + },{ + "name": "CreateBuildingMaterials", + "version": "1.0.1", + "description": "Creates Building Material attributes based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "buildingMaterialDataArray": { + "type": "array", + "description" : "Array of data to create new Building Materials.", + "items": { "type": "object", + "description": "Data to create a Building Material.", "properties": { - "attributeIds": { - "$ref": "#/AttributeIds" + "name": { + "type": "string", + "description": "Name." + }, + "id": { + "type": "string", + "description": "Identifier." + }, + "manufacturer": { + "type": "string", + "description": "Manufacturer." + }, + "description": { + "type": "string", + "description": "Decription." + }, + "connPriority": { + "type": "integer", + "description": "Intersection priority." + }, + "cutFillIndex": { + "type": "integer", + "description": "Index of the Cut Fill." + }, + "cutFillPen": { + "type": "integer", + "description": "Cut Fill Foreground Pen." + }, + "cutFillBackgroundPen": { + "type": "integer", + "description": "Cut Fill Background Pen." + }, + "cutSurfaceIndex": { + "type": "integer", + "description": "Index of the Cut Surface." + }, + "thermalConductivity": { + "type": "number", + "description": "Thermal Conductivity." + }, + "density": { + "type": "number", + "description": "Density." + }, + "heatCapacity": { + "type": "number", + "description": "Heat Capacity." + }, + "embodiedEnergy": { + "type": "number", + "description": "Embodied Energy." + }, + "embodiedCarbon": { + "type": "number", + "description": "Embodied Carbon." } }, "additionalProperties": false, - "required": [ - "attributeIds" + "required" : [ + "name" ] } }, - { - name : "CreateComposites", - version : "1.0.2", - description : "Creates Composite attributes based on the given parameters.", - inputScheme : { + "overwriteExisting": { + "type": "boolean", + "description": "Overwrite the Building Material if exists with the same name. The default is false." + } + }, + "additionalProperties": false, + "required": [ + "buildingMaterialDataArray" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "attributeIds": { + "$ref": "#/AttributeIds" + } + }, + "additionalProperties": false, + "required": [ + "attributeIds" + ] + } + },{ + "name": "CreateComposites", + "version": "1.0.2", + "description": "Creates Composite attributes based on the given parameters.", + "inputScheme": { + "type": "object", + "properties": { + "compositeDataArray": { + "type": "array", + "description" : "Array of data to create Composites.", + "items": { "type": "object", + "description": "Data to create a Composite.", "properties": { - "compositeDataArray": { + "name": { + "type": "string", + "description": "Name." + }, + "useWith": { "type": "array", - "description" : "Array of data to create Composites.", + "description" : "Array of types the composite can used with.", "items": { + "type": "string", + "description": "Element type (Wall, Slab, Roof, or Shell)" + } + }, + "skins": { + "type": "array", + "description" : "Array of skin data.", + "items" : { "type": "object", - "description": "Data to create a Composite.", - "properties": { - "name": { + "description" : "Data to represent a skin.", + "properties" : { + "type": { "type": "string", - "description": "Name." + "description" : "Skin type (Core, Finish, or Other)" }, - "useWith": { - "type": "array", - "description" : "Array of types the composite can used with.", - "items": { - "type": "string", - "description": "Element type (Wall, Slab, Roof, or Shell)" - } + "buildingMaterialId" : { + "$ref": "#/AttributeIdArrayItem" }, - "skins": { - "type": "array", - "description" : "Array of skin data.", - "items" : { - "type": "object", - "description" : "Data to represent a skin.", - "properties" : { - "type": { - "type": "string", - "description" : "Skin type (Core, Finish, or Other)" - }, - "buildingMaterialId" : { - "$ref": "#/AttributeIdArrayItem" - }, - "framePen" : { - "type": "integer", - "description" : "Skin frame pen index." - }, - "thickness" : { - "type": "number", - "description" : "Skin thickness (in meters)." - } - }, - "additionalProperties": false, - "required" : [ - "type", - "buildingMaterialId", - "framePen", - "thickness" - ] - } + "framePen" : { + "type": "integer", + "description" : "Skin frame pen index." }, - "separators": { - "type": "array", - "description" : "Array of skin separator data. The number of items must be the number of skins plus one.", - "items" : { - "type": "object", - "description" : "Data to represent a skin separator.", - "properties" : { - "lineTypeId": { - "$ref": "#/AttributeIdArrayItem" - }, - "linePen" : { - "type": "integer", - "description" : "Separator line pen index." - } - }, - "additionalProperties": false, - "required" : [ - "lineTypeId", - "linePen" - ] - } + "thickness" : { + "type": "number", + "description" : "Skin thickness (in meters)." } }, "additionalProperties": false, "required" : [ - "name", - "skins", - "separators" + "type", + "buildingMaterialId", + "framePen", + "thickness" ] } }, - "overwriteExisting": { - "type": "boolean", - "description" : "Overwrite the Composite if exists with the same name. The default is false." - } - }, - "additionalProperties": false, - "required" : [ - "compositeDataArray" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "attributeIds": { - "$ref": "#/AttributeIds" - } - }, - "additionalProperties": false, - "required": [ - "attributeIds" - ] - } - }, - { - name : "GetBuildingMaterialPhysicalProperties", - version : "0.1.3", - description : "Retrieves the physical properties of the given Building Materials.", - inputScheme : { - "type": "object", - "properties": { - "attributeIds": { - "$ref": "#/AttributeIds" - } - }, - "additionalProperties": false, - "required": [ - "attributeIds" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "properties" : { + "separators": { "type": "array", - "description" : "Physical properties list.", - "items": { + "description" : "Array of skin separator data. The number of items must be the number of skins plus one.", + "items" : { "type": "object", - "properties": { - "properties": { - "type": "object", - "description": "Physical properties.", - "properties": { - "thermalConductivity": { - "type": "number", - "description": "Thermal Conductivity." - }, - "density": { - "type": "number", - "description": "Density." - }, - "heatCapacity": { - "type": "number", - "description": "Heat Capacity." - }, - "embodiedEnergy": { - "type": "number", - "description": "Embodied Energy." - }, - "embodiedCarbon": { - "type": "number", - "description": "Embodied Carbon." - } - } + "description" : "Data to represent a skin separator.", + "properties" : { + "lineTypeId": { + "$ref": "#/AttributeIdArrayItem" + }, + "linePen" : { + "type": "integer", + "description" : "Separator line pen index." } - } + }, + "additionalProperties": false, + "required" : [ + "lineTypeId", + "linePen" + ] } } }, "additionalProperties": false, - "required": [ - "properties" + "required" : [ + "name", + "skins", + "separators" ] - } + } }, + "overwriteExisting": { + "type": "boolean", + "description" : "Overwrite the Composite if exists with the same name. The default is false." + } + }, + "additionalProperties": false, + "required" : [ + "compositeDataArray" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "attributeIds": { + "$ref": "#/AttributeIds" + } + }, + "additionalProperties": false, + "required": [ + "attributeIds" + ] + } + },{ + "name": "GetBuildingMaterialPhysicalProperties", + "version": "0.1.3", + "description": "Retrieves the physical properties of the given Building Materials.", + "inputScheme": { + "type": "object", + "properties": { + "attributeIds": { + "$ref": "#/AttributeIds" + } + }, + "additionalProperties": false, + "required": [ + "attributeIds" ] }, - { - name : 'Property Commands', - commands : [ - { - name : "GetPropertyValuesOfElements", - version : "1.0.6", - description : "Returns the property values of the elements for the given property. It works for subelements of hierarchal elements also.", - inputScheme : { + "outputScheme": { + "type": "object", + "properties": { + "properties" : { + "type": "array", + "description" : "Physical properties list.", + "items": { "type": "object", "properties": { - "elements": { - "$ref": "#/Elements" - }, "properties": { - "$ref": "#/PropertyIds" - } - }, - "additionalProperties": false, - "required": [ - "elements", - "properties" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "propertyValuesForElements": { - "$ref": "#/PropertyValuesOrErrorArray", - "description": "List of property value lists. The order of the outer list is that of the given elements. The order of the inner lists are that of the given properties." + "type": "object", + "description": "Physical properties.", + "properties": { + "thermalConductivity": { + "type": "number", + "description": "Thermal Conductivity." + }, + "density": { + "type": "number", + "description": "Density." + }, + "heatCapacity": { + "type": "number", + "description": "Heat Capacity." + }, + "embodiedEnergy": { + "type": "number", + "description": "Embodied Energy." + }, + "embodiedCarbon": { + "type": "number", + "description": "Embodied Carbon." + } + } } - }, - "additionalProperties": false, - "required": [ - "propertyValuesForElements" - ] + } } - }, - { - name : "SetPropertyValuesOfElements", - version : "1.0.6", - description : "Sets the property values of elements. It works for subelements of hierarchal elements also.", - inputScheme : { - "type": "object", - "properties": { - "elementPropertyValues": { - "$ref": "#/ElementPropertyValues" - } - }, - "additionalProperties": false, - "required": [ - "elementPropertyValues" - ] - }, - outputScheme : { + } + }, + "additionalProperties": false, + "required": [ + "properties" + ] + } + }] + },{ + "name": "Library Commands", + "commands": [{ + "name": "GetLibraries", + "version": "1.0.1", + "description": "Gets the list of loaded libraries.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "libraries": { + "type": "array", + "description": "A list of project libraries.", + "items": { "type": "object", + "description": "Library", "properties": { - "executionResults": { - "$ref": "#/ExecutionResults" + "name": { + "type": "string", + "description": "Library name." + }, + "path": { + "type": "string", + "description": "A filesystem path to library location." + }, + "type": { + "type": "string", + "description": "Library type." + }, + "available": { + "type": "boolean", + "description": "Is library not missing." + }, + "readOnly": { + "type": "boolean", + "description": "Is library not writable." + }, + "twServerUrl": { + "type": "string", + "description": "URL address of the TeamWork server hosting the library." + }, + "urlWebLibrary": { + "type": "string", + "description": "URL of the downloaded Internet library." } }, "additionalProperties": false, "required": [ - "executionResults" + "name", + "type", + "path" ] } + } + }, + "additionalProperties": false, + "required": [ + "libraries" + ] + } + },{ + "name": "ReloadLibraries", + "version": "1.0.0", + "description": "Executes the reload libraries command.", + "inputScheme": null, + "outputScheme": null + }] + },{ + "name": "Teamwork Commands", + "commands": [{ + "name": "TeamworkSend", + "version": "0.1.0", + "description": "Performs a send operation on the currently opened Teamwork project.", + "inputScheme": null, + "outputScheme": null + },{ + "name": "TeamworkReceive", + "version": "0.1.0", + "description": "Performs a receive operation on the currently opened Teamwork project.", + "inputScheme": null, + "outputScheme": null + }] + },{ + "name": "Issue Management Commands", + "commands": [{ + "name": "CreateIssue", + "version": "1.0.2", + "description": "Creates a new issue.", + "inputScheme": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the issue." }, + "parentId": { + "type": "string", + "description": "The id of the parent issue, optional." + }, + "tagText": { + "type": "string", + "description": "Tag text of the issue, optional." + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "outputScheme": null + },{ + "name": "DeleteIssue", + "version": "1.0.2", + "description": "Deletes the specified issue.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to delete." + } + }, + "additionalProperties": false, + "required": [ + "issueId" ] }, - { - name : 'Classification Commands', - commands : [ - { - name : "GetClassificationsOfElements", - version : "1.0.7", - description : "Returns the classification of the given elements in the given classification systems.", - inputScheme : { + "outputScheme": null + },{ + "name": "GetIssues", + "version": "1.0.2", + "description": "Retrieves information about existing issues.", + "inputScheme": null, + "outputScheme": { + "type": "object", + "properties": { + "issues": { + "type": "array", + "description": "A list of existing issues.", + "items": { "type": "object", "properties": { - "elements": { - "$ref": "#/Elements" + "guid": { + "type": "string", + "description": "Issue identifier" + }, + "name": { + "type": "string", + "description": "Issue name" + }, + "parentGuid": { + "type": "string", + "description": "The identifier of the parent issue" + }, + "creaTime": { + "type": "integer", + "description": "Issue creation time" + }, + "modiTime": { + "type": "integer", + "description": "Issue modification time" + }, + "tagText": { + "type": "string", + "description": "Issue tag text - labels" + }, + "tagTextElemGuid": { + "type": "string", + "description": "The identifier of the attached tag text element" }, - "classificationSystemIds": { - "$ref": "#/ClassificationSystemIds" + "isTagTextElemVisible": { + "type": "boolean", + "description": "The visibility of the attached tag text element" } }, "additionalProperties": false, "required": [ - "elements", - "classificationSystemIds" + "guid", + "name", + "parentGuid", + "creaTime", + "modiTime", + "tagText", + "tagTextElemGuid", + "isTagTextElemVisible" ] - }, - outputScheme : { - "$ref": "#/ElementClassificationsOrErrors", - "description": "The list of element classification item identifiers. Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects." } + } + }, + "additionalProperties": false, + "required": [ + "issues" + ] + } + },{ + "name": "AddCommentToIssue", + "version": "1.0.6", + "description": "Adds a new comment to the specified issue.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to add the comment." + }, + "author": { + "type": "string", + "description": "The author of the new comment." + }, + "status": { + "type": "integer", + "description": "Comment status type." }, - { - name : "SetClassificationsOfElements", - version : "1.0.7", - description : "Sets the classifications of elements. In order to set the classification of an element to unclassified, omit the classificationItemId field.", - inputScheme : { + "text": { + "type": "string", + "description": "Comment text to add." + } + }, + "additionalProperties": false, + "required": [ + "issueId", + "text" + ] + }, + "outputScheme": null + },{ + "name": "GetCommentsFromIssue", + "version": "1.0.6", + "description": "Retrieves comments information from the specified issue.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to get the comments." + } + }, + "additionalProperties": false, + "required": [ + "issueId" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "comments": { + "type": "array", + "description": "A list of existing comments.", + "items": { "type": "object", "properties": { - "elements": { - "$ref": "#/Elements" + "guid": { + "type": "string", + "description": "Comment identifier" }, - "classificationSystemIds": { - "$ref": "#/ClassificationSystemIds" + "author": { + "type": "string", + "description": "Comment author" + }, + "text": { + "type": "string", + "description": "Comment text" + }, + "status": { + "type": "string", + "description": "Comment status" + }, + "creaTime": { + "type": "integer", + "description": "Comment creation time" } }, "additionalProperties": false, "required": [ - "elements", - "classificationSystemIds" + "guid", + "author", + "text", + "status", + "creaTime" ] - }, - outputScheme : { - "$ref": "#/ElementClassificationsOrErrors", - "description": "The list of element classification item identifiers. Order of the ids are the same as in the input. Non-existing elements or non-existing classification systems are represented by error objects." } } + }, + "additionalProperties": false, + "required": [ + "comments" ] - }, - { - name : 'Teamwork Commands', - commands : [ - { - name : "TeamworkSend", - version : "0.1.0", - description : "Performs a send operation on the currently opened Teamwork project.", - inputScheme : null, - outputScheme : null - }, - { - name : "TeamworkReceive", - version : "0.1.0", - description : "Performs a receive operation on the currently opened Teamwork project.", - inputScheme : null, - outputScheme : null + } + },{ + "name": "AttachElementsToIssue", + "version": "1.0.6", + "description": "Attaches elements to the specified issue.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to attach elements." + }, + "elementsIds": { + "$ref": "#/Elements" }, + "type": { + "type": "integer", + "description": "Attachment type status." + } + }, + "additionalProperties": false, + "required": [ + "issueId", + "elementsIds", + "type" ] }, - { - name : 'Issue Management Commands', - commands : [ - { - name : "CreateIssue", - version : "1.0.2", - description : "Creates a new issue.", - inputScheme : { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the issue." - }, - "parentId": { - "type": "string", - "description": "The id of the parent issue, optional." - }, - "tagText": { - "type": "string", - "description": "Tag text of the issue, optional." - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - outputScheme : null - }, - { - name : "DeleteIssue", - version : "1.0.2", - description : "Deletes a chosen issue.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to delete." - } - }, - "additionalProperties": false, - "required": [ - "issueId" - ] - }, - outputScheme : null - }, - { - name : "GetIssues", - version : "1.0.2", - description : "Retrieves information about existing issues.", - inputScheme : null, - outputScheme : { - "type": "object", - "properties": { - "issues": { - "type": "array", - "description": "A list of existing issues.", - "items": { - "type": "object", - "properties": { - "guid": { - "type": "string", - "description": "Issue identifier" - }, - "name": { - "type": "string", - "description": "Issue name" - }, - "parentGuid": { - "type": "string", - "description": "The identifier of the parent issue" - }, - "creaTime": { - "type": "integer", - "description": "Issue creation time" - }, - "modiTime": { - "type": "integer", - "description": "Issue modification time" - }, - "tagText": { - "type": "string", - "description": "Issue tag text - labels" - }, - "tagTextElemGuid": { - "type": "string", - "description": "The identifier of the attached tag text element" - }, - "isTagTextElemVisible": { - "type": "boolean", - "description": "The visibility of the attached tag text element" - } - }, - "additionalProperties": false, - "required": [ - "guid", - "name", - "parentGuid", - "creaTime", - "modiTime", - "tagText", - "tagTextElemGuid", - "isTagTextElemVisible" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "issues" - ] - } - }, - { - name : "AddCommentToIssue", - version : "1.0.6", - description : "Adds a new comment to the chosen issue.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to add the comment." - }, - "author": { - "type": "string", - "description": "The author of the new comment." - }, - "status": { - "type": "integer", - "description": "Comment status type." - }, - "text": { - "type": "string", - "description": "Comment text to add." - } - }, - "additionalProperties": false, - "required": [ - "issueId", - "text" - ] - }, - outputScheme : null - }, - { - name : "GetCommentsFromIssue", - version : "1.0.6", - description : "Retrieves comments information of the chosen issue.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to get the comments." - } - }, - "additionalProperties": false, - "required": [ - "issueId" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "comments": { - "type": "array", - "description": "A list of existing comments.", - "items": { - "type": "object", - "properties": { - "guid": { - "type": "string", - "description": "Comment identifier" - }, - "author": { - "type": "string", - "description": "Comment author" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "status": { - "type": "string", - "description": "Comment status" - }, - "creaTime": { - "type": "integer", - "description": "Comment creation time" - } - }, - "additionalProperties": false, - "required": [ - "guid", - "author", - "text", - "status", - "creaTime" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "comments" - ] - } + "outputScheme": null + },{ + "name": "DetachElementsFromIssue", + "version": "1.0.6", + "description": "Detaches elements from the specified issue.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to deattach elements." }, - { - name : "AttachElementsToIssue", - version : "1.0.6", - description : "Attaches elements to the chosen issue.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to attach elements." - }, - "elementsIds": { - "$ref": "#/Elements" - }, - "type": { - "type": "integer", - "description": "Attachment type status. (0: New, 1: Highlighted, 2: Deleted, 3: Modified" - } - }, - "additionalProperties": false, - "required": [ - "issueId", - "elementsIds", - "type" - ] - }, - outputScheme : null + "elementsIds": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "issueId", + "elementsIds" + ] + }, + "outputScheme": null + },{ + "name": "GetElementsAttachedToIssue", + "version": "1.0.6", + "description": "Retrieves attached elements of the specified issue, filtered by attachment type.", + "inputScheme": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The id of the issue to get elements." }, - { - name : "DetachElementsFromIssue", - version : "1.0.6", - description : "Detaches elements from the chosen issue.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to deattach elements." - }, - "elementsIds": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "issueId", - "elementsIds" - ] + "type": { + "type": "integer", + "description": "The attachment type to filter elements." + } + }, + "additionalProperties": false, + "required": [ + "issueId", + "type" + ] + }, + "outputScheme": { + "type": "object", + "properties": { + "elements": { + "$ref": "#/Elements" + } + }, + "additionalProperties": false, + "required": [ + "elements" + ] + } + },{ + "name": "ExportIssuesToBCF", + "version": "1.0.6", + "description": "Exports specified issues to a BCF file.", + "inputScheme": { + "type": "object", + "properties": { + "issuesIds": { + "type": "array", + "description": "Issue Ids to export.", + "items": { + "type": "string" }, - outputScheme : null + "minItems": 1 }, - { - name : "GetElementsAttachedToIssue", - version : "1.0.6", - description : "Retrieves attached elements of the chosen issue, filtered by attachment type.", - inputScheme : { - "type": "object", - "properties": { - "issueId": { - "type": "string", - "description": "The id of the issue to get elements." - }, - "type": { - "type": "integer", - "description": "The attachment type to filter elements. (0: New, 1: Highlighted, 2: Deleted, 3: Modified)" - } - }, - "additionalProperties": false, - "required": [ - "issueId", - "type" - ] - }, - outputScheme : { - "type": "object", - "properties": { - "elements": { - "$ref": "#/Elements" - } - }, - "additionalProperties": false, - "required": [ - "elements" - ] - } + "exportPath": { + "type": "string", + "description": "The os path to the bcf file, including it's name." }, - { - name : "ExportIssuesToBCF", - version : "1.0.6", - description : "Exports chosen issues to the bcf file.", - inputScheme : { - "type": "object", - "properties": { - "issuesIds": { - "type": "array", - "description": "Issue Ids to export. Empty parameter will fetch all existing issues.", - "items": { - "type": "string" - } - }, - "exportPath": { - "type": "string", - "description": "The os path to the bcf file, including it's name." - }, - "useExternalId": { - "type": "boolean", - "description": "Use external IFC ID or Archicad IFC ID as referenced in BCF topics." - }, - "alignBySurveyPoint": { - "type": "boolean", - "description": "Align BCF views by Archicad Survey Point or Archicad Project Origin." - } - }, - "additionalProperties": false, - "required": [ - "exportPath", - "useExternalId", - "alignBySurveyPoint" - ] - }, - outputScheme : null + "useExternalId": { + "type": "boolean", + "description": "Use external IFC ID or Archicad IFC ID as referenced in BCF topics." }, - { - name : "ImportIssuesFromBCF", - version : "1.0.6", - description : "Imports issues from the chosen bcf file.", - inputScheme : { - "type": "object", - "properties": { - "importPath": { - "type": "string", - "description": "The os path to the bcf file, including it's name." - }, - "alignBySurveyPoint": { - "type": "boolean", - "description": "Align BCF views by Archicad Survey Point or Archicad Project Origin." - } - }, - "additionalProperties": false, - "required": [ - "importPath", - "alignBySurveyPoint" - ] - }, - outputScheme : null + "alignBySurveyPoint": { + "type": "boolean", + "description": "Align BCF views by Archicad Survey Point or Archicad Project Origin." + } + }, + "additionalProperties": false, + "required": [ + "exportPath", + "useExternalId", + "alignBySurveyPoint" + ] + }, + "outputScheme": null + },{ + "name": "ImportIssuesFromBCF", + "version": "1.0.6", + "description": "Imports issues from the specified BCF file.", + "inputScheme": { + "type": "object", + "properties": { + "importPath": { + "type": "string", + "description": "The os path to the bcf file, including it's name." }, + "alignBySurveyPoint": { + "type": "boolean", + "description": "Align BCF views by Archicad Survey Point or Archicad Project Origin." + } + }, + "additionalProperties": false, + "required": [ + "importPath", + "alignBySurveyPoint" ] - } -]; + }, + "outputScheme": null + }] + }]; \ No newline at end of file diff --git a/docs/archicad-addon/common_schema_definitions.js b/docs/archicad-addon/common_schema_definitions.js index 3c47ecb..20d7c7d 100644 --- a/docs/archicad-addon/common_schema_definitions.js +++ b/docs/archicad-addon/common_schema_definitions.js @@ -1,632 +1,618 @@ -var gSchemaDefinitions = { - "Elements": { - "type": "array", - "description": "A list of elements.", - "items": { - "$ref": "#/ElementIdArrayItem" - } - }, - "ElementIdArrayItem": { - "type": "object", - "properties": { - "elementId": { - "$ref": "#/ElementId" +var gSchemaDefinitions = { + "Elements": { + "type": "array", + "description": "A list of elements.", + "items": { + "$ref": "#/ElementIdArrayItem" } }, - "additionalProperties": false, - "required": [ - "elementId" - ] - }, - "ElementId": { - "type": "object", - "description": "The identifier of an element.", - "properties": { - "guid": { - "$ref": "#/Guid" - } + "ElementIdArrayItem": { + "type": "object", + "properties": { + "elementId": { + "$ref": "#/ElementId" + } + }, + "additionalProperties": false, + "required": [ + "elementId" + ] }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "AttributeIds": { - "type": "array", - "description": "A list of attributes.", - "items": { - "$ref": "#/AttributeIdArrayItem" - } - }, - "AttributeIdArrayItem": { - "type": "object", - "properties": { - "attributeId": { - "$ref": "#/AttributeId" - } + "ElementId": { + "type": "object", + "description": "The identifier of an element.", + "properties": { + "guid": { + "$ref": "#/Guid" + } + }, + "additionalProperties": false, + "required": [ + "guid" + ] }, - "additionalProperties": false, - "required": [ - "attributeId" - ] - }, - "AttributeId": { - "type": "object", - "description": "The identifier of an attribute.", - "properties": { - "guid": { - "$ref": "#/Guid" + "AttributeIds": { + "type": "array", + "description": "A list of attributes.", + "items": { + "$ref": "#/AttributeIdArrayItem" } }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "Guid": { - "type": "string", - "description": "A Globally Unique Identifier (or Universally Unique Identifier) in its string representation as defined in RFC 4122.", - "format": "uuid", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - }, - "Hotlinks": { - "type": "array", - "description": "A list of hotlink nodes.", - "items": { - "$ref": "#/Hotlink" - } - }, - "Hotlink": { - "type": "object", - "description": "The details of a hotlink node.", - "properties": { - "location": { - "type": "string", - "description": "The path of the hotlink file." + "AttributeIdArrayItem": { + "type": "object", + "properties": { + "attributeId": { + "$ref": "#/AttributeId" + } }, - "children": { - "$ref": "#/Hotlinks", - "description": "The children of the hotlink node if it has any." + "additionalProperties": false, + "required": [ + "attributeId" + ] + }, + "AttributeId": { + "type": "object", + "description": "The identifier of an attribute.", + "properties": { + "guid": { + "$ref": "#/Guid" + } + }, + "additionalProperties": false, + "required": [ + "guid" + ] + }, + "Guid": { + "type": "string", + "description": "A Globally Unique Identifier (or Universally Unique Identifier) in its string representation as defined in RFC 4122.", + "format": "uuid", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "Hotlinks": { + "type": "array", + "description": "A list of hotlink nodes.", + "items": { + "$ref": "#/Hotlink" } }, - "additionalProperties": false, - "required": [ - "location" - ] - }, - "GDLParametersDictionary": { - "type": "object", - "description": "The dictionary of GDL parameters. The name of the parameter is the key and the details of the parameter are in the value.", - "additionalProperties": { - "type": "#/GDLParameterDetails" - } - }, - "GDLParameterDetails": { - "type": "object", - "description": "Details of a GDL parameter.", - "properties": { - "index": { - "type": "string", - "description": "The index of the parameter." + "Hotlink": { + "type": "object", + "description": "The details of a hotlink node.", + "properties": { + "location": { + "type": "string", + "description": "The path of the hotlink file." + }, + "children": { + "$ref": "#/Hotlinks", + "description": "The children of the hotlink node if it has any." + } }, - "type": { - "type": "string", - "description": "The type of the parameter." + "additionalProperties": false, + "required": [ + "location" + ] + }, + "GDLParametersDictionary": { + "type": "object", + "description": "The dictionary of GDL parameters. The name of the parameter is the key and the details of the parameter are in the value.", + "additionalProperties": { + "type": "#/GDLParameterDetails" + } + }, + "GDLParameterDetails": { + "type": "object", + "description": "Details of a GDL parameter.", + "properties": { + "index": { + "type": "string", + "description": "The index of the parameter." + }, + "type": { + "type": "string", + "description": "The type of the parameter." + }, + "dimension1": { + "type": "number", + "description": "The 1st dimension of array (in case of array value)." + }, + "dimension2": { + "type": "number", + "description": "The 2nd dimension of array (in case of array value)." + }, + "value": { + "description": "The value of the parameter." + } }, - "dimension1": { - "type": "string", - "description": "The 1st dimension of array (in case of array value)." + "additionalProperties": true, + "required": [ + "index", + "type", + "value" + ] + }, + "2DCoordinate": { + "type": "object", + "description" : "2D coordinate.", + "properties" : { + "x": { + "type": "number", + "description" : "X value of the coordinate." + }, + "y" : { + "type": "number", + "description" : "Y value of the coordinate." + } }, - "dimension2": { - "type": "string", - "description": "The 2nd dimension of array (in case of array value)." + "additionalProperties": false, + "required" : [ + "x", + "y" + ] + }, + "3DCoordinate": { + "type": "object", + "description" : "3D coordinate.", + "properties" : { + "x": { + "type": "number", + "description" : "X value of the coordinate." + }, + "y" : { + "type": "number", + "description" : "Y value of the coordinate." + }, + "z" : { + "type": "number", + "description" : "Z value of the coordinate." + } }, - "value": { - "description": "The value of the parameter." - } + "additionalProperties": false, + "required" : [ + "x", + "y", + "z" + ] }, - "additionalProperties": true, - "required": [ - "index", - "type", - "value" - ] - }, - "2DCoordinate": { - "type": "object", - "description" : "2D coordinate.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the coordinate." + "3DDimensions": { + "type": "object", + "description" : "Dimensions in 3D.", + "properties" : { + "x": { + "type": "number", + "description" : "X dimension." + }, + "y" : { + "type": "number", + "description" : "Y dimension." + }, + "z" : { + "type": "number", + "description" : "Z dimension." + } }, - "y" : { - "type": "number", - "description" : "Y value of the coordinate." - } + "additionalProperties": false, + "required" : [ + "x", + "y", + "z" + ] }, - "additionalProperties": false, - "required" : [ - "x", - "y" - ] - }, - "3DCoordinate": { - "type": "object", - "description" : "3D coordinate.", - "properties" : { - "x": { - "type": "number", - "description" : "X value of the coordinate." + "Error": { + "type": "object", + "description": "The details of an error.", + "properties": { + "code": { + "type": "integer", + "description": "The code of the error." + }, + "message": { + "type": "string", + "description": "The error message." + } }, - "y" : { - "type": "number", - "description" : "Y value of the coordinate." + "additionalProperties": false, + "required": [ + "code", + "message" + ] + }, + "ErrorItem": { + "type": "object", + "properties": { + "error": { + "$ref": "#/Error" + } }, - "z" : { - "type": "number", - "description" : "Z value of the coordinate." - } + "additionalProperties": false, + "required": [ "error" ] }, - "additionalProperties": false, - "required" : [ - "x", - "y", - "z" - ] - }, - "3DDimensions": { - "type": "object", - "description" : "Dimensions in 3D.", - "properties" : { - "x": { - "type": "number", - "description" : "X dimension." + "SuccessfulExecutionResult": { + "type": "object", + "description": "The result of a successful execution.", + "properties": { + "success": { + "type": "boolean", + "enum": [ true ] + } }, - "y" : { - "type": "number", - "description" : "Y dimension." + "additionalProperties": false, + "required": [ + "success" + ] + }, + "FailedExecutionResult": { + "type": "object", + "description": "The result of a failed execution.", + "properties": { + "success": { + "type": "boolean", + "enum": [ false ] + }, + "error": { + "$ref": "#/Error", + "description": "The details of an execution failure." + } }, - "z" : { - "type": "number", - "description" : "Z dimension." - } + "additionalProperties": false, + "required": [ + "success", + "error" + ] }, - "additionalProperties": false, - "required" : [ - "x", - "y", - "z" - ] - }, - "PropertyId": { - "type": "object", - "description": "The identifier of a property.", - "properties": { - "guid": { - "$ref": "#/Guid" - } + "ExecutionResult": { + "type": "object", + "description": "The result of the execution.", + "oneOf": [ + { + "$ref": "#/SuccessfulExecutionResult" + }, + { + "$ref": "#/FailedExecutionResult" + } + ] }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "PropertyIdArrayItem": { - "type": "object", - "properties": { - "propertyId": { - "$ref": "#/PropertyId" + "ExecutionResults": { + "type": "array", + "description": "A list of execution results.", + "items": { + "$ref": "#/ExecutionResult" } }, - "additionalProperties": false, - "required": [ - "propertyId" - ] - }, - "PropertyIds": { - "type": "array", - "description": "A list of property identifiers.", - "items": { - "$ref": "#/PropertyIdArrayItem" - } - }, - "PropertyValue": { - "type": "object", - "description": "The display string value of a property.", - "properties": { - "value": { - "type": "string" - } + "ElementType": { + "type": "string", + "description": "The type of an element.", + "enum": [ + "Wall", + "Column", + "Beam", + "Window", + "Door", + "Object", + "Lamp", + "Slab", + "Roof", + "Mesh", + "Zone", + "CurtainWall", + "Shell", + "Skylight", + "Morph", + "Stair", + "Railing", + "Opening" + ] }, - "additionalProperties": true, - "required": [ - "value" - ] - }, - "Error": { - "type": "object", - "description": "The details of an error.", - "properties": { - "code": { - "type": "integer", - "description": "The code of the error." - }, - "message": { - "type": "string", - "description": "The error message." - } + "ElementFilter": { + "type": "string", + "description": "A filter type for an element.", + "enum": [ + "IsEditable", + "IsVisibleByLayer", + "IsVisibleByRenovation", + "IsVisibleByStructureDisplay", + "IsVisibleIn3D", + "OnActualFloor", + "OnActualLayout", + "InMyWorkspace", + "IsIndependent", + "InCroppedView", + "HasAccessRight", + "IsOverriddenByRenovation" + ] }, - "additionalProperties": false, - "required": [ - "code", - "message" - ] - }, - "ErrorItem": { - "type": "object", - "properties": { - "error": { - "$ref": "#/Error" - } + "WindowType": { + "type": "string", + "description": "The type of a window.", + "enum": [ + "FloorPlan", + "Section", + "Details", + "3DModel", + "Layout", + "Drawing", + "CustomText", + "CustomDraw", + "MasterLayout", + "Elevation", + "InteriorElevation", + "Worksheet", + "Report", + "3DDocument", + "External3D", + "Movie3D", + "MovieRendering", + "Rendering", + "ModelCompare", + "Interactive Schedule", + "Unknown" + ] }, - "additionalProperties": false, - "required": [ "error" ] - }, - "SuccessfulExecutionResult": { - "type": "object", - "description": "The result of a successful execution.", - "properties": { - "success": { - "type": "boolean", - "enum": [ true ] - } + "PropertyId": { + "type": "object", + "description": "The identifier of a property.", + "properties": { + "guid": { + "$ref": "#/Guid" + } + }, + "additionalProperties": false, + "required": [ + "guid" + ] }, - "additionalProperties": false, - "required": [ - "success" - ] - }, - "FailedExecutionResult": { - "type": "object", - "description": "The result of a failed execution.", - "properties": { - "success": { - "type": "boolean", - "enum": [ false ] + "PropertyIdArrayItem": { + "type": "object", + "properties": { + "propertyId": { + "$ref": "#/PropertyId" + } }, - "error": { - "$ref": "#/Error", - "description": "The details of an execution failure." + "additionalProperties": false, + "required": [ + "propertyId" + ] + }, + "PropertyIds": { + "type": "array", + "description": "A list of property identifiers.", + "items": { + "$ref": "#/PropertyIdArrayItem" } }, - "additionalProperties": false, - "required": [ - "success", - "error" - ] - }, - "ExecutionResult": { - "type": "object", - "description": "The result of the execution.", - "oneOf": [ - { - "$ref": "#/SuccessfulExecutionResult" + "PropertyValue": { + "type": "object", + "description": "The display string value of a property.", + "properties": { + "value": { + "type": "string" + } }, - { - "$ref": "#/FailedExecutionResult" + "additionalProperties": true, + "required": [ + "value" + ] + }, + "PropertyValueOrErrorItem": { + "type": "object", + "description": "A property value or an error", + "oneOf": [ + { + "title": "propertyValue", + "properties": { + "propertyValue": { + "$ref": "#/PropertyValue" + } + }, + "additionalProperties": false, + "required": [ "propertyValue" ] + }, + { + "title": "error", + "$ref": "#/ErrorItem" + } + ] + }, + "PropertyValues": { + "type": "array", + "description": "A list of property values.", + "items": { + "$ref": "#/PropertyValueOrErrorItem" } - ] - }, - "ExecutionResults": { - "type": "array", - "description": "A list of execution results.", - "items": { - "$ref": "#/ExecutionResult" - } - }, - "PropertyValueOrErrorItem": { - "type": "object", - "description": "A property value or an error", - "oneOf": [ - { - "title": "propertyValue", - "properties": { - "propertyValue": { - "$ref": "#/PropertyValue" - } + }, + "PropertyValuesOrError": { + "type": "object", + "description": "A list of property values or an error.", + "oneOf": [ + { + "title": "propertyValues", + "properties": { + "propertyValues": { + "$ref": "#/PropertyValues" + } + }, + "additionalProperties": false, + "required": [ "propertyValues" ] }, - "additionalProperties": false, - "required": [ "propertyValue" ] - }, - { - "title": "error", + { + "title": "error", "$ref": "#/ErrorItem" + } + ] + }, + "PropertyValuesOrErrorArray": { + "type": "array", + "description": "A list of property value lists.", + "items": { + "$ref": "#/PropertyValuesOrError" } - ] - }, - "PropertyValues": { - "type": "array", - "description": "A list of property values.", - "items": { - "$ref": "#/PropertyValueOrErrorItem" - } - }, - "PropertyValuesOrError": { - "type": "object", - "description": "A list of property values or an error.", - "oneOf": [ - { - "title": "propertyValues", - "properties": { - "propertyValues": { - "$ref": "#/PropertyValues" - } + }, + "ElementPropertyValue": { + "type": "object", + "description": "A property value with the identifiers of the property and its owner element.", + "properties": { + "elementId": { + "$ref": "#/ElementId" }, - "additionalProperties": false, - "required": [ "propertyValues" ] - }, - { - "title": "error", - "$ref": "#/ErrorItem" - } - ] - }, - "PropertyValuesOrErrorArray": { - "type": "array", - "description": "A list of property value lists.", - "items": { - "$ref": "#/PropertyValuesOrError" - } - }, - "ElementPropertyValue": { - "type": "object", - "description": "A property value with the identifiers of the property and its owner element.", - "properties": { - "elementId": { - "$ref": "#/ElementId" - }, - "propertyId": { - "$ref": "#/PropertyId" + "propertyId": { + "$ref": "#/PropertyId" + }, + "propertyValue": { + "type": "#/PropertyValue" + } }, - "propertyValue": { - "type": "#/PropertyValue" - } + "additionalProperties": false, + "required": [ + "elementId", + "propertyId", + "propertyValue" + ] }, - "additionalProperties": false, - "required": [ - "elementId", - "propertyId", - "propertyValue" - ] - }, - "ElementPropertyValues": { - "type": "array", - "description": "A list of element property values.", - "items": { - "$ref": "#/ElementPropertyValue" - } - }, - "ClassificationSystemId": { - "type": "object", - "description": "The identifier of a classification system.", - "properties": { - "guid": { - "$ref": "#/Guid" + "ElementPropertyValues": { + "type": "array", + "description": "A list of element property values.", + "items": { + "$ref": "#/ElementPropertyValue" } }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "ClassificationSystemIdArrayItem": { - "type": "object", - "properties": { - "classificationSystemId": { - "$ref": "#/ClassificationSystemId" - } + "ClassificationSystemId": { + "type": "object", + "description": "The identifier of a classification system.", + "properties": { + "guid": { + "$ref": "#/Guid" + } + }, + "additionalProperties": false, + "required": [ + "guid" + ] }, - "additionalProperties": false, - "required": [ - "classificationSystemId" - ] - }, - "ClassificationSystemIds": { - "type": "array", - "description": "A list of classification system identifiers.", - "items": { - "$ref": "#/ClassificationSystemIdArrayItem" - } - }, - "ClassificationItemId": { - "type": "object", - "description": "The identifier of a classification item.", - "properties": { - "guid": { - "$ref": "#/Guid" - } + "ClassificationSystemIdArrayItem": { + "type": "object", + "properties": { + "classificationSystemId": { + "$ref": "#/ClassificationSystemId" + } + }, + "additionalProperties": false, + "required": [ + "classificationSystemId" + ] }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "ClassificationSystemId": { - "type": "object", - "description": "The identifier of a classification system.", - "properties": { - "guid": { - "$ref": "#/Guid" + "ClassificationSystemIds": { + "type": "array", + "description": "A list of classification system identifiers.", + "items": { + "$ref": "#/ClassificationSystemIdArrayItem" } }, - "additionalProperties": false, - "required": [ - "guid" - ] - }, - "ClassificationId": { - "type": "object", - "description": "The element classification identifier.", - "properties": { - "classificationSystemId": { - "$ref": "#/ClassificationSystemId" + "ClassificationItemId": { + "type": "object", + "description": "The identifier of a classification item.", + "properties": { + "guid": { + "$ref": "#/Guid" + } }, - "classificationItemId": { - "$ref": "#/ClassificationItemId", - "description": "The element's classification in the given system. If no value is specified here, the element is Unclassified in this system." - } + "additionalProperties": false, + "required": [ + "guid" + ] }, - "additionalProperties": false, - "required": [ - "classificationSystemId" - ] - }, - "ClassificationIdOrError": { - "type": "object", - "description": "A classification identifier or an error.", - "oneOf": [ - { - "title": "classificationId", - "properties": { - "classificationId": { - "$ref": "#/ClassificationId" - } + "ClassificationId": { + "type": "object", + "description": "The element classification identifier.", + "properties": { + "classificationSystemId": { + "$ref": "#/ClassificationSystemId" }, - "additionalProperties": false, - "required": [ "classificationId" ] + "classificationItemId": { + "$ref": "#/ClassificationItemId", + "description": "The element's classification in the given system. If no value is specified here, the element is Unclassified in this system." + } }, - { - "title": "error", - "$ref": "#/ErrorItem" + "additionalProperties": false, + "required": [ + "classificationSystemId" + ] + }, + "ClassificationIdOrError": { + "type": "object", + "description": "A classification identifier or an error.", + "oneOf": [ + { + "title": "classificationId", + "properties": { + "classificationId": { + "$ref": "#/ClassificationId" + } + }, + "additionalProperties": false, + "required": [ "classificationId" ] + }, + { + "title": "error", + "$ref": "#/ErrorItem" + } + ] + }, + "ClassificationIdsOrErrors": { + "type": "array", + "description": "A list of element classification identifiers or errors.", + "items": { + "$ref": "#/ClassificationIdOrError" } - ] - }, - "ClassificationIdsOrErrors": { - "type": "array", - "description": "A list of element classification identifiers or errors.", - "items": { - "$ref": "#/ClassificationIdOrError" - } - }, - "ElementClassificationOrError": { - "type": "object", - "description": "Element classification identifiers or errors.", - "oneOf": [ - { - "title": "classificationIds", - "properties": { - "classificationIds": { - "$ref": "#/ClassificationIdsOrErrors" - } + }, + "ElementClassificationOrError": { + "type": "object", + "description": "Element classification identifiers or errors.", + "oneOf": [ + { + "title": "classificationIds", + "properties": { + "classificationIds": { + "$ref": "#/ClassificationIdsOrErrors" + } + }, + "additionalProperties": false, + "required": [ "classificationIds" ] }, - "additionalProperties": false, - "required": [ "classificationIds" ] - }, - { - "title": "error", - "$ref": "#/ErrorItem" + { + "title": "error", + "$ref": "#/ErrorItem" + } + ] + }, + "ElementClassificationsOrErrors": { + "type": "array", + "description": "A list of element classification identifiers or errors.", + "items": { + "$ref": "#/ElementClassificationOrError" } - ] - }, - "ElementClassificationsOrErrors": { - "type": "array", - "description": "A list of element classification identifiers or errors.", - "items": { - "$ref": "#/ElementClassificationOrError" - } - }, - "ElementType": { - "type": "string", - "description": "The type of an element.", - "enum": [ - "Wall", - "Column", - "Beam", - "Window", - "Door", - "Object", - "Lamp", - "Slab", - "Roof", - "Mesh", - "Zone", - "CurtainWall", - "Shell", - "Skylight", - "Morph", - "Stair", - "Railing", - "Opening" - ] - }, - "ElementFilter": { - "type": "string", - "description": "A filter type for an element.", - "enum": [ - "IsEditable", - "IsVisibleByLayer", - "IsVisibleByRenovation", - "IsVisibleByStructureDisplay", - "IsVisibleIn3D", - "OnActualFloor", - "OnActualLayout", - "InMyWorkspace", - "IsIndependent", - "InCroppedView", - "HasAccessRight", - "IsOverriddenByRenovation" - ] - }, - "WindowType": { - "type": "string", - "description": "The type of a window.", - "enum": [ - "FloorPlan", - "Section", - "Details", - "3DModel", - "Layout", - "Drawing", - "CustomText", - "CustomDraw", - "MasterLayout", - "Elevation", - "InteriorElevation", - "Worksheet", - "Report", - "3DDocument", - "External3D", - "Movie3D", - "MovieRendering", - "Rendering", - "ModelCompare", - "Interactive Schedule", - "Unknown" - ] - }, - "ElementClassification": { - "type": "object", - "description": "The classification of an element.", - "properties": { - "elementId": { - "$ref": "#/ElementId" + }, + "ElementClassification": { + "type": "object", + "description": "The classification of an element.", + "properties": { + "elementId": { + "$ref": "#/ElementId" + }, + "classificationId": { + "$ref": "#/ClassificationId" + } }, - "classificationId": { - "$ref": "#/ClassificationId" - } + "additionalProperties": false, + "required": [ + "elementId", + "classificationId" + ] }, - "additionalProperties": false, - "required": [ - "elementId", - "classificationId" - ] - }, - "ElementClassifications": { - "type": "array", - "description": "A list of element classification identifiers.", - "items": { - "$ref": "#/ElementClassification" - } - } -}; + "ElementClassifications": { + "type": "array", + "description": "A list of element classification identifiers.", + "items": { + "$ref": "#/ElementClassification" + } + }}; \ No newline at end of file