Guidelines for creating an upper level design file

1. Make sure you have a clear idea of what you what your file to accomplish. (i.e. what exactly do you want the file to draw and what do you want the user to be allowed to control)
2. Decide what the user inputs for this file should be
- Put these inputs at the top of the file and do not collapse them in an area
- Leave these values undefined when you commit the code for use so that the code will be able to accept the user’s inputted values.

3. Decide what information you need from Expert Inputs
- Expert Inputs is a large file which contains much more information than is necessary for designing one specific part of the plant, therefore we do not want to reference all of it.

- Simply determine which information is necessary for the code currently being worked on to produce the desired output and include it in the new file, perhaps in a section called “From Expert Inputs.”   
4. Decide what references to design and drawing files you will need to include in your code.   There should be as few references to design files as possible.  Files that will most likely need to be referenced are MathFunctions, PipeDatabase, FluidsFunctions,  MtoATranslators, MtoATranslatorsWrapped, and PlumbingF.  Other than those files the only other file that should be referenced is the design code for the file that is currently being worked on (also possibly the drawing code for the piece currently being worked on, see #5).  

5. When it comes to actually drawing the piece there are two basic options, include a reference to the drawing code for the piece that is being worked on, or rewrite most of the drawing code yourself.  
- Including a reference to the drawing code is much preferable to rewriting the code, as that way whenever changes are made to the drawing code they will also be made in the modular version of the drawing code.
- Only rewrite the code to draw the piece if absolutely necessary.

6. Finally, at the end of code include the AC script that you wish to be outputted.  You must include that variable and the stack that it is equal to as well the variable undefined underneath it.
i.e.  AC.LFOM = stack(your stack that draws the lfom)
      AC.LFOM =
would be at the end of the code that draws an lfom.

7. In addition to the upper level design mathcad file that you have just created you also need to create a method file so that your design file can communicate with labview and the user inputs that were input online. Please the Method template file in the ADT designs folder for information on how to do this.

Important Notes

1. When creating the mathcad file for your modular design make sure that no variables are defined twice in your code. This causes problems with the design server.
2. When creating design specs files, make sure that you do NOT include any fields called UI.variable. These are variables about the user who requested the design and will not show up if included in the design specs.

  • No labels