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

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:


By [mailto:vstanev@nemetschek.net Vladislav Stanev]
By [mailto:vstanev@nemetschek.net Vladislav Stanev]
== Intro ==


Script developers will be able to create installation scripts of their menus and tools.
Script developers will be able to create installation scripts of their menus and tools.

Revision as of 20:10, 12 September 2017

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

By Vladislav Stanev

Intro

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.