Customizing VectorWorks

Customizing the Interface

Both the Windows and Macintosh versions of VectorWorks have a customizable interface. You can change the tools and commands that appear in the interface by adding new ones, deleting unused ones, or rearrange their order and location. You can also add, modify, or delete keyboard shortcuts to these tools and commands. The combination of commands and tools in VectorWorks is called a workspace. Therefore, it is the workspace that you are modifying when you change any individual command or tool. You can change the current workspace, make a copy of the workspace and change the copy or create a new workspace.

To create or edit a workspace

    1. Make sure you are currently in the workspace you wish to modify.

    2. From the File menu, select Workspaces and then select Workspace Editor.

    The Workspace Editor Options dialog appears.

    3. Click the desired workspace editing option

    Edit Current Workspace changes the workspace you are currently in. Edit Copy Of Current Workspace makes an exact copy of you current workspace and you change the copy. This is the safest and easiest method. Edit New Workspace creates a new workspace in which you must arrange all of the tool and commands from scratch.

    4. Enter a name for your workspace.

    5. Click OK.

    The Workspace Editor dialog appears.

    Note: If you add a command or a tool to a menu or palette and do not delete it from it s current location (if it already exists), it will occur in both locations. You must highlight the item and press the delete key to delete the undesired item.

To change any current commands

    1. Click the Menu tab.

    The dialog is repopulated to show the Menu tab settings.

    It contains two areas - one for possible menu commands and one that shows your current Menu Bar pulldown menus. The individual commands are organized by topic. The Menus are listed exactly as they appear in the workspace you were currently using when you invoked the Configure command.

    2. Click Normal or Option.

    Normal selects the command in normal mode.

    Option selects the command only if you press Option (Macintosh) or Shift (Windows) while selecting the command. It is important to note that menu items that have an option will toggle between option and normal mode. Option commands will only display when the Option (Macintosh) or Shift (Windows) key is pressed.

    3. Modify the workspace items.

    To add an item to an existing menu, drag the item from the list of commands into the desired position in the list of menus.

    To add a new menu or submenu, drag the New Menu command item into the desired location in the Menu list.

    To delete items or menus, select the item and press the Delete key.

    To change names of menus (sub-menus), select the item and change the name directly in the list.

    You can add or change the keyboard shortcut for the command you enter but the key entered can not be used by any other command.To change a keyboard shortcut, click on the key identified to the far right of the command.

    Note: You can not assign function keys F1-F4 to tools and you can not assign any function keys to commands.

    4. Click OK.

To change tools

    1. Click the Tools tab.

    The dialog is repopulated to show the Tools tab settings.

    It contains two areas - one for all available tools and one that shows your current palettes. The individual tools are organized by topic. The palettes are listed exactly as they appear in the workspace you were currently using when you invoked the Configure command.

    When you click on a palette, as much of it as can fit is displayed to the right of the dialog.

    2. Modify the tool items.

    To add an item to an existing menu, drag the item from the list of tools into the desired position in the desired palette.

    To change the number of tools that the palette contains horizontally, change the value in the width field.

    To delete items or tools, select the item and press the Delete key. You can also drag the item outside of the column.

    To change names of palettes, select the item and change the name directly in the list.

    3. Click OK.

To change general or mode bar keyboard shortcut keys

    1. Click the Keys Tab.

    The dialog box is repopulated to show the Keyboard tab settings.

    Mode groups, other keys, and constraint keys are listed. Mode Groups sets the keys which are used in switching between different modes when a particular tool is selected. For example, the wall tool has three different modes and a settings dialog. You can control the mode by bringing up the dialog or by clicking the appropriate icon in the mode bar or by pressing one of the keys set in the Mode Groups box.

    Other Keys sets the keyboard shortcut for the four miscellaneous settings shown.

    Constraint keys sets the keyboard shortcuts for the constraints palette.

    2. Click OK.

Creating Plug-ins

You can create your own Plug-in tools, commands, and objects in VectorWorks. A tool is a button on a palette that requires a complex drawing operation. A command is a menu item that performs a single operation upon selection. An object is a drawing that accepts specific parameters to conform to a specific shape, such as a door or window. You can use VectorWorks' Software Developers Kit to create Plug-ins in C++ or use VectorWorks' Create Plug-in feature to develop VectorScript based Plug-ins. All Plug-ins are placed in the Plug-ins folder. Once you have a tool, command or object created and in the Plug-ins folder, you can add that tool to the interface via the Workspace Editor. This section details the creation of Plug-ins via the Create Plug-in feature. This feature allows you to create Plug-ins only in VectorScript.

To create a VectorScript Plug-in

    1. Select Create Plug-in from the Organize menu.

    The Plug-ins window appears.

    2. Click New.

    The Assign Name window appears.

    3. Enter a name for the Plug-in

    4. Click the desired plug-in type.

    5. Click OK.

    The buttons applicable to the plug-in type chosen are activated in the VectorScript External dialog.

    6. Optional - Click Category.

    The Assign Category Window appears. Enter the name of the desired category.

    The categories are listed in the Workspace editor and will only be used to assign Plug-ins to categories in Workspaces.

    The data entered in this field is case sensitive.

    Click OK.

    7. Follow instructions for the Plug-in Type chosen.

Plug-in Menu Commands

To create a Plug-in menu command

    1. In the Assign Name window, click Command.

    2. Click OK.

    The Script and Properties buttons are available.

    3. Click the Script button.

    The Edit Script window appears.

    4. Enter the script and click OK.

    You can enter the script manually in the Script Editor, create it in any text editor and copy it into the Script Editor, or use Get Text to get the text of an existing script. See "Using the VectorScript Editor" for more information on creating scripts.

    5. Click the Properties button.

    The Command Properties Window appears.

    6. Click the desired Availability Options.

    Each of these availability states determine when your menu command will be enabled. The default is to enable the command all of the time with all states set to ignore. When you change the option to prohibit, that condition will prohibit the command from becoming enabled. If you choose required, the state will be required in order for the command to be enabled.

Option Explanation
Plan Projection The drawing is in Top Plan Standard View.
Object Select There is object selected.
Selection has 2D In the current selection there are 2D objects.
Selection has 3D In the current selection there are 3D objects.
Multiple Selection There are multiple objects selected.

    7. Enter Balloon Help text.

    All Plug-ins are created cross-platform. Balloon help is used only on the Macintosh but should be created for all Plug-ins. Balloon help should conform to the Macintosh standard for creating Balloon Help. Tool Tips for Windows will be automatically generated from the Name of the Plug-in.

    8. Click OK.

    You are returned to the Plug-in window.

    9. Click Done.

    10. Use the Workspace Editor to place the menu command as desired.

    See "Customizing the Interface" for more information on the Workspace Editor.

Plug-in Tools

To create a Plug-in Tool

    1. In the Assign Name window, click Tool.

    2. Click OK.

    The Script and Properties buttons are available.

    3. Click the Script button.

    4. The Edit Script window appears.

    5. Enter the script and click OK.

    You can enter the script manually in the Script Editor, create it in any text editor and copy it into the Script Editor, or use Get Text to get the text of an existing script. See "Using the VectorScript Editor" for more information on creating scripts.

    6. Click the Properties button.

    The Tool Properties Window appears.

    7. Enter the desired Mode bar text.

    This is the text that will appear in the Mode bar when the tool is selected. This text should be concise and describe what the next click will do.

    8. Select the desired Projection limitation.

    You can choose 2D or 3D which indicates that the projection of the drawing is not relevant to the activation of the tool. Selecting Requires 2D requires that you must be in a 2D projection for the tool to work. Selecting Requires 3D will invoke the default dialog requesting a change to a 3D projection in order to use the tool.

    9. Select how you would like the script executed.

    You can choose to execute it as soon as you click in the drawing area or to wait until you actually move the mouse.

    10. Click the generic tool icon and paste the desired icon which will appear on a palette.

    You can use any bitmap editor to create an icon that is 32 X 32 bits. This icon will then be cropped to 24w X 18h. Make sure the desired image is in the center of the 32 X 32 image. Select the icon you have created and copy it to your clipboard. You can then paste it into the Tool Properties window.

    11. Enter Balloon Help text.

    All Plug-ins are created cross-platform. Balloon help is used only on the Macintosh but should be created for all Plug-ins. Balloon help should conform to the Macintosh standard for creating Balloon Help. Tool Tips for Windows will be automatically generated from the Name of the Plug-in.

    12. Click OK.

    You are returned to the Plug-in window.

    13. Click Done.

    14. Use the Workspace Editor to place the tool in the Plug-in palette as desired.

    See "Customizing the Interface" for more information on the Workspace Editor.

Plug-in Objects

To create a Plug-in Objects

    1. In the Assign Name window, click Object.

    2. Click OK.

    The Script, Properties, Parameters, and Insert Options buttons are available.

    3. Click the Parameters button.

    The windows invoked by clicking this button allow to enter the fields that will appear in the object info palette. This field will allow users to enter data that will customize the object that your script creates.

    Note: You must execute the steps performed through the Parameters button before you create your script in order to utilize those parameters in your script.

    The Edit Format window opens.

    4. Click Add.

    The Edit Field Window appears.

    5. Enter the name of the desired Field.

    6. Click the desired Field Type.

    For pop-up windows and radio buttons, the Values button becomes enabled and the Values window appears. Enter the names of each radio button (followed by a return) or enter the text exactly as it will appear in the pop-up. Click OK.

    7. Enter the default value for the field.

    For radio buttons and pop-ups a list will appear. Select the desired default. For all other field types, enter the default value you wish to appear in the data entry field.

    8. Click OK.

    You are returned to the Edit Format window.

    9. Repeat steps 4 through 8 for each desired field.

    10. Make modifications if desired.

    You can modify the field order by selecting the Move Up and Move Down buttons.

    You can also Edit or Remove the selected Field.

    11. Click OK.

    You are returned to the Plug-in window.

    12. Click the Scripts button.

    The Edit Script window appears.

    13. Enter the script and click OK.

    The script for VectorScript Plug-in Objects should draw the object based on the current values of the parameters. The script should contain drawing functions only, and should not contain functions to display dialogs or interact with the VectorWorks user in any way.

    The script will initially be executed after the user clicks in the drawing with the object's tool selected. The script will also be executed automatically when the user changes the value of a parameter on the object Info palette shape pane, an in other situations where the object will be redrawn.

    VectorWorks automatically declares VectorScript variables which correspond to each of the parameters you specified in the Parameters dialog. They will not appear in the VAR section of your script, but they will be available to you.

    These variables will have names slightly different from their corresponding parameter names so that they conform to valid VectorScript syntax. The variables will begin with the letter "p" to hint that they are used for parameters. Any spaces in the parameter name will be replaced by underscore characters.

    When creating Plug-in Objects, a button called Parameters is added to the Edit Script window. Click this button to reveal a list of all the variables corresponding to the parameters you entered via the parameters button on the Plug-in window. You can then double click the parameter to insert it into the script you are creating. Click OK when you are finished pasting your parameters.

    You can enter the script manually in the Script Editor, create it in any text editor and copy it into the Script Editor, or use Get Text to get the text of an existing script. See "Using the VectorScript Editor" for more information on creating scripts.

    14. Click the Properties button.

    The Tool Properties Window appears.

    15. Enter the desired Mode bar text.

    This is the text that will appear in the Mode bar when the tool is selected. This text should be concise and describe what the tool will do.

    Note: The Projection limitation is preset to Requires 2D. The VectorScript Object Placement tool requires a 2D projection.

    Note: The Execute pop-up menu is preset to Immediate and selection options disabled. VectorScript object placement tools are required to execute when you click on the drawing.

    16. Click the generic tool icon and paste the desired icon which will appear on a palette.

    You can use any bitmap editor to create an icon that is 32 X 32 bits. This icon will then be cropped to 24w X 18h. Make sure the desired image is in the center of the 32 X 32 image. Select the icon you have created and copy it to your clipboard. You can then paste it into the Tool Properties window.

    17. Enter Balloon Help text.

    All Plug-ins are created cross-platform. Balloon help is used only on the Macintosh but should be created for all Plug-ins. Balloon help should conform to the Macintosh standard for creating Balloon Help. Tool Tips for Windows will be automatically generated from the Name of the Plug-in.

    18. Click OK.

    You are returned to the Plug-in window.

    19. Click the Insert Options Button.

    The Insert Options window appears.

    20. Click the desired insert options for inserting the object into walls.

    21. Click OK.

    You are returned to the Plug-in window.

    22. Click Done.

    23. Use the Workspace Editor to place the menu command as desired.

    See "Customizing the Interface" for more information on the Workspace Editor.



tech@diehlgraphsoft.com
Copyright © 1998, Diehl Graphsoft Inc. All rights reserved.