VS:Install Plugins into the Current Workspace: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
Line 17: Line 17:
An example of third-party menus installed under company name ‘MyCompany'.
An example of third-party menus installed under company name ‘MyCompany'.


[[Media:Thirdparty Menu Popup]]
:[[Image:Thirdparty_Menu_Popup.png]]


Here is the code of the example menu commands displayed on Figure above:
Here is the code of the example menu commands displayed on Figure above:
Line 38: Line 38:
Example third-party tool set.
Example third-party tool set.


[[Media:Thirdparty Toolset]]
: [[Image:Thirdparty_Toolset.png]]

Revision as of 20:09, 12 September 2017

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

By Vladislav Stanev

Script developers will be able to create installation scripts of their menus and tools. These installation scripts will use API to allow menu and tool insertion into the current workspace. The location will be predetermined and the user will not be able to change it.

Menu Commands

New menu commands will be installed under Tools -> Third-party menu popup inside popup with the name of the company name. The user can add menus in the company menu, or specify menu popup structure under it. The company name and the menu path will be expected as parameters of the API.

An example of third-party menus installed under company name ‘MyCompany'.

Here is the code of the example menu commands displayed on Figure above:

vs.wsEditBegin('MyCompany')
vs.wsEditAddMenu('VS_linear_Calc')
vs.wsEditAddMenu('VS_Setup')
vs.wsEditEnd(True)

Note: The parameter with the menu command name can contain /-delimited path to place the menu command inside popup. E.g. 'SubMenu/VS_Linear Calc'

Note: The Third-party menu command will not be available until at least one menu is registered there.

Tools

New tools will be installed inside Third-party palette. The company name will be used to create tool sets.

Example third-party tool set.