Adding a Button

Use the Button control to add a command button that launches an application, add-in, or Web page.


Before you begin: Open an existing card or start a new card.
See Also
Creating a Card
Localizing Card Controls
Localization Dialog Box
  1. Click Button or select File > Mode > Button.
  2. Click the card where you want to locate the button.
  3. From the Button properties pane, enter the button name in Caption.
  4. To add language translations for the Caption entry:
    1. Click Localization .
    2. Complete the Localization dialog box.
  5. Select from Command type one of the following:
    • Command String and enter in Command a command that users initiate when they press the button. Alternatively, make selections from Command. Selection are:
      SelectionDescription/Action
      BrowseOpens a Browse for program dialog box, where you locate and select the appropriate executable program file.
      Note: The file and path must be available to all user systems intending to use the command button.
      File path (1%)Adds the full file path to the currently selected file.
      File Vault Name (2%) Adds the current vault name to the currently selected file.
      File Name (%3)Adds the file name of the currently selected file.
      File Extension (%4) Adds the file extension of the currently selected file.
      Folder Path (%5)Adds the folder path of the currently selected file.
      Percent %%Adds a percentage to the currently selected file.
    • Browse for File to open a browse for file dialog box, where users select a file. To make this dialog box user-ready:
      1. Enter the title of the browse for file dialog box in Dialog box caption.
      2. Select from Destination attribute a data card attribute to hold the full path to the file that users select in the browse dialog box.
      3. Select the Only files in the vault check box if users can only select vault files.
      4. Select the Path relative to vault root check box if users can only select a file whose file path is relative to the vault root.
      5. Select the Permit multiple selection check box if users can select multiple files in the browse for file dialog box.
    • Browse for Folder to open a browse for folder dialog box, where users select a folder. To make this dialog box user-ready:
      1. Enter the title of the folder browse dialog box in Dialog box caption.
      2. From Destination attribute, select a data card attribute to hold the full path of the folder that users select in the browse for folder dialog box.
    • Run Add-in and select a Connector for SOLIDWORKS add-in from Add-in CLSID (Class ID). Users clicking the button launch the add-in.
      Note: The add-in launches the activity on a button click only when SLW_AddInRegistration contains the CardButton event. SLW_AddInRegistration is a Global Configuration Object (GCO) attribute.
    • Web Page and enter the URL, or Web page address in WWW-address. Users clicking the button launch the Web page.
    • Find User to open a user selection dialog box, where users select users. To make the dialog box user-ready:
      1. Enter the dialog box title in Dialog box caption.
      2. From Destination attribute, select a data card attribute to hold the names of the users selected in the find user dialog box.
      3. Select the Permit multiple selections check box to allow multiple user selection.

After completing your customized card and saving it, the button is included on the card.