PTC Mathcad Gateway was released to the market about a month ago. You may have visited the PTC Mathcad Gateway homepage, watched the recent webcast or tested out the demo server. You may even be thinking about what a PTC Mathcad Gateway deployment for your engineering department would look like. That naturally would bring up the topic of the webpage, internal or external, you would like your end users to access. When you get to the point of deploying a PTC Mathcad Gateway server at your company you’ll need to start building some web forms to interface with your PTC Mathcad worksheets. You’ll receive some templates to get you started, but here are a few tips and tricks to make your customized web forms more dynamic for your end users.
Input & Output Aliases
As you may have noticed on our demo server, when your results are returned to the browser there is an inputs section and an outputs section that make up PTC Mathcad Gateway’s output report. Each input and output has a description, a value, and may or may not have a unit. The description is sourced from the alias of the region in the PTC Mathcad sheet. When you set up your PTC Mathcad worksheets to interface with PTC Mathcad Gateway, open the ‘Show As List’ dialog from the ‘Input/Output’ tab to get a master view of which regions are assigned as inputs and outputs. The alias of each input and output can be manually edited to give the PTC Mathcad Gateway user a meaningful description of what value they represent in the PTC Mathcad Gateway output report.
PTC Mathcad Prime 3.1’s API brings the ability to not only pass scalar values, strings, and matrices to and from a PTC Mathcad instance, but you can also pass units associated with those values. This is something you will likely want to include on your PTC Mathcad Gateway web forms so your PTC Mathcad Gateway deployment is just as unit intelligent as your PTC Mathcad worksheets are.
For inputs to a PTC Mathcad Gateway web form, units can be added for none, some, or all of the inputs. The user could be forced to use a certain dimension for a given input, or could be given a choice of dimensions by using a dropdown menu or radio button construct in the webform. The same goes for outputs; output units can be set to automatically return a given dimension to a user or the user could be given the choice of units from a dropdown list or radio button grouping.
Create input controls with dropdown menus
Another use case that dropdown menus and radio button groupings bring to the table is the ability to control what end users can input to a given worksheet. PTC Mathcad Gateway admins can set up web forms to only allow users to submit inputs from a finite set of numbers or text strings. For example you may want to provide a list of materials that a user can choose from or you may want to constrain the user to submit only an integer number of teeth on a pinion gear between 18 and 32. These types of input controls can be put into place when customizing your web forms to ensure end users are staying within the scope of a particular calculation.
Do you have any web form tip or trick you’d like to share? Please comment below to describe what unique constructs you have on your PTC Mathcad Gateway webforms!