Auto Document Number (ADN) User Guide Christopher Cook HAWK RIDGE SYSTEMS Table of Contents Table of Contents _________________________________________________________________________________1 Overview __________________________________________________________________________________________2 System Requirements _____________________________________________________________________________2 Installation ________________________________________________________________________________________2 Un-Installing the Add-In __________________________________________________________________________3 Disabling the Add-In ______________________________________________________________________________3 Setting Up the SQL Database _____________________________________________________________________4 Creating the Database __________________________________________________________________________4 Creating the Tables _____________________________________________________________________________4 Connecting the ADN to the SQL Database ________________________________________________________7 Customizing the Interface _________________________________________________________________________8 Instructions Tab _________________________________________________________________________________8 Categories Tab __________________________________________________________________________________8 Building Sample Queries _____________________________________________________________________9 Customizing the Name Scheme ______________________________________________________________9 Setting the Serial Number Format __________________________________________________________ 10 Rename Permission Tab ______________________________________________________________________ 10 Variable Mappings Tab _______________________________________________________________________ 12 Setting up the Data Card ________________________________________________________________________ 12 Using Auto Document Number (ADN) __________________________________________________________ 13 Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 1 Overview The Auto Document Number (ADN) is a customizable add-in that allows generation of serial numbers based on user selection of up to four criterion. The add-in connects to a SQL database and extracts the next available number from the table. This number, as well as other selected values, can be assigned to card variables. Once a new serial number is generated, the document can be automatically renamed to the new number. System Requirements The Auto Document Numbering add-in requires SolidWorks Enterprise PDM 2013 or 2014 and Microsoft .NET framework 4.0 or later to be installed. Installing Using CEX NOTE: If an older version of the add-in is already installed in the vault, it must be removed by following the removal steps described in the next section, before installing the new version. Your download from the HawkWareApps.com store contain a CEX file. Installation of the add-in can be done from any machine by the administrator in the Enterprise PDM administration tool. To install using the CEX file use the following steps: 1. From any client computer open the Enterprise PDM Administration application. 2. Expand your vault and log in. 3. Right-click on the vault name in the tree, selecting “Import…” 4. Browse to the CEX file (HawkWare_ADN.cex), select it, and click “Open” to finish the import. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 2 Un-Installing the Add-In 1. Close open applications; exit Enterprise from tray icon if loaded. 2. Login to Enterprise PDM Vault Administration. 3. Expand the vault where the add-in is installed. 4. Right-Click the add-in and select Remove. 5. Click OK to confirm. After removing the add-in, it is necessary to either reboot all client machines or re-start Explorer.exe process on all of them as follows: 1. Open the task manager and end the explorer.exe process. Do not close task manager. 2. Restart Explorer.exe by selecting File > New Task > type explorer.exe. Click OK. Disabling the Add-In You can temporarily disable the functionality of the addin without having to uninstall completely. To disable or enable the add-in: 1. In the Enterprise PDM Administration, find the add-in under Add-ins node. 2. Right click on the add-in and select Diagnostics. 3. Select either the Disable or Enable radio button and click OK. Note: Enable Logging is used when troubleshooting the add-in. Make sure this option is always checked off as it affects performance. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 3 Setting Up the SQL Database ADN can connect to your existing SQL database to pull the categories data from. Below is an example of creating and using SLQ tables to work with ADN: Creating the Database 1. Open SQL management studio and log on to your SQL server. 2. Create a database by right clicking 'Databases' node and select 'New Database'. Type a name (e.g. 'HawkWare_ADN'). Creating the Tables 1. Right-click the database created in previous step and select 'New Query'. 2. In the Query window, copy the following queries and click 'Execute' from the top toolbar. NOTE: This is a sample query, creating 3 tables; Countries, Cities and Companies. Countries has 2 columns; Name and Code. Cities has 2 columns; Name and Country. (Country corresponds to the Name entries in Countries) Companies has 2 columns; Name and City. (City corresponds to the Name entries in Cities) Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 4 Create Table Countries ( ID int identity,Name varchar(50),code varchar(10) ); Create Table Cities ( ID int identity,Name Varchar(50),country varchar(50) ); Create Table Companies ( ID int identity,Name varchar(50),City varchar(50) ); 3. Expand the database node and find the Tables node. Expand it and find the Countries table. If you do not see it, right-click on Tables Node and select 'Refresh'. 4. Right-Click on the Countries table and select "Edit Top 200 Rows". Fill values as shown below : Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 5 5. Repeat the same with Cities Table: 6. Repeat with Companies table: 7. Close SQL Management Studio. Later sections will use this data in the sample configuration. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 6 Connecting the ADN to the SQL Database 1. In the Enterprise PDM Administration, find the add-in under Add-ins node. 2. Right click on the add-in and select Settings. 3. Enter your SQL credentials, the name of the server hosting the SQL server and a database where the table containing the selection records reside. The serial numbers will also be generated from this database. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 7 Customizing the Interface Instructions Tab The 'Instructions' tab allows you to show or hide the drop-down boxes displayed to the user as well as customize the text describing each drop-down list. 1. Type the user instruction for each drop-down and check/uncheck the 'Show' boxes for each drop-down. 2. Click Save when finished. Categories Tab The drop-down lists on the ‘Instructions’ tab are populated from query results. The queries can be independent or reference values from other drop-down boxes. For example, when a user selects "Canada" from first drop-down box, the second drop-down box can be populated by Canadian cities. This tab also provides: Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 8 The option to rename the files after assigning a number (check box). Schema builder for designing the final number string. Format for the counter portion of the number. Building Sample Queries The following example is derived from the sample database created earlier in the Creating the Tables section. 1. Click on the f button for a given category. 2. Type a valid query. You can use the parameters on the left side to reference values from other drop-down lists. For example: SELECT City FROM Cities WHERE country='Category1Value' 3. In Display Field and Value Field boxes, type the names of the table columns to specify which column is displayed in the drop-down list and which column is regarded as the value. For example a Materials table may have a 'Name' column and a 'Material Code' column which could be specified as display field and value field respectively. Consider the material table below with a query specified for Category2: SELECT NAME,CODE FROM MATERIALS Category2Txt will be Aluminum-Brushed, Stainless Steel etc while Category2Value will be ALB, SS, and ALP. Customizing the Name Scheme Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 9 1. In the Name Schema, click Build. 2. Select parameters from the left side, you may separate components with any character; For example Category1Value-Category1Value-SerialNum results in CA-SA-0001. Setting the Serial Number Format The add-in extracts integers from the database starting from 1. You can customize this number by specifying a format. For example, by typing '10000' the generated numbers will be in the form of 10001,10002 etc. Rename Permission Tab NOTE: The ‘Rename Permission’ tab will only appear if the “Rename file after number is assigned” option is checked on the ‘Categories’ tab. The application updates version free variables, and also renames the file (when 'Check-in and Rename' option is set to true). This requires a user to have permission to 'Edit version free variables' as well as 'Rename File', which the user running the add-in may not have. You can set a proxy user (e.g. Admin) whose credentials will be used. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 10 Check the 'User Credentials Below to Rename File and Update Version Free Variables' and enter a user name and password. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 11 Variable Mappings Tab After a user has made selections, the selected values can be mapped to one or more card variables. The variables can be mapped to text and values of the drop-down boxes as well as the generated serial number and the final document name. 1. Click on Variable Mapping tab. 2. Enter name of the card variables each parameter maps to, if any. To enter more than one variable, separate them by commas. 3. The FileName parameter indicates the resulting combination name based on user selections. The SerialNum refers to the numeric value extracted from the database. Setting up the Data Card The ADN is triggered from a button on the data card. Add a button to any card requiring access to the ADN and set the button as shown below: Command type: Run Add-in Name of Add-in: hawkware_adn Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 12 Using Auto Document Number (ADN) 1. Click on the assigned button on a data card. 2. Make your selections and click 'Generate'. 3. Choose whether to check-in and rename after variables have been assigned, by checking/unchecking the checkbox. 4. Click OK. Streamline your SOLIDWORKS & Enterprise PDM Experience. www.hawkwareapps.com [email protected] | [email protected] 13
© Copyright 2025 Paperzz