cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Make input/output regions work from one Mathcad document to another

0 Kudos

Make input/output regions work from one Mathcad document to another

Mathcad has this cool input and output region capability for integration with other programs. Why not make it so I can use this within Mathcad itself? Then I could, e.g.: create one document with some standard beam equations, set up inputs with dimensions and loading and outputs with stresses and deflections. Then I could refer to this calculation set repeatedly in other documents with a nice in-worksheet interface to see what goes in and what comes out.

5 Comments
Derbigdog
14-Alexandrite

Mathcad 15 has this functionality and so does Prime 3.0-5.0. In Prime you go to the INPUT/OUTPUT tab and select INCLUDE WORKSHEET. In Mathcad 15 and earlier You go to the INSERT tab and click on REFERENCE. In Mathcad 15 and earlier it works great. In Prime I found it to be partially function, as some times values are transferred and sometimes they are not from the same worksheet.. 

wwicker
5-Regular Member
I can INCLUDE a worksheet, yes, but that's not what I'm asking for. Or not quite. I'm looking for three things beyond just including a worksheet. I'll call the process REFERENCE to distinguish it from the current functionality. When I REFERENCE worksheet R in another worksheet B, I want this (new) functionality: 1) The REFERENCE region auto-populates with input fields that correspond to the input regions defined in worksheet R. 2) The REFERENCE region has an output value that is (say) a matrix/vector or all the output regions defined in worksheet R. I can assign this output value or pieces of it to variables in worksheet B. 3) None of the other variables or functions defined in worksheet R show up in worksheet B (variables and functions in worksheet R remain local to that worksheet.) 4) For extra credit, the REFERENCE region should (optionally) also display the first text region defined in worksheet R for documentation purposes.
Derbigdog
14-Alexandrite

 Thanks for the clarification to the original question. However, your list of requirements could use more clarification.

For requirement (1) does auto populate mean that you want both the variables and their values to appear in worksheet B once the "REFERENCE" worksheet_r is included? Or are you looking for a command such as REFERENCE("worksheet_r") 

For requirement (2) there are ways to define Matrices that have disassociated values. So when you include a matrix (call it M) in B and include REFERENCE before it M's values will be transferred from worksheet_r's M.

Requirement (3) works that way with INCLUDE. If you do not include a variable in worksheet B that is in worksheet_r it does not get transferred over.

Requirement (4) I assume you are talking about transferring text from worksheet_r to worksheet B without the use of text variables.

wwicker
5-Regular Member

Fair enough. I'll try again. I envision this process in two steps

 

Step 1: Prepare a worksheet to be referenced.

  1. Use the existing "assign inputs" and "assign outputs" functionality to flag regions as inputs and outputs.
  2. (optional) Add a text region as a documentary note about what's going on here. This could default to be the first text region in the worksheet, or it could be hand-picked ("Assign Documentation")

 

Step 2: Reference that worksheet in another.

  1. Reference the worksheet (much like I would INCLUDE one now.)
  2. The REFERENCE region is displayed, with information pulled from the referenced worksheet. I may have a nomenclature problem here. The word I'm after might be "placeholder" rather than "region". When I REFERENCE another document, that's a single region. Inside that region there are multiple placeholders and other displayed info. (Sort of like a plot region has displayed data and placeholders to enter information)
  • Text pulled from the referenced worksheet as documentation.
  • Zero or more placeholders for me to add literal values or variable names (to use the variable's value) as inputs to the referenced worksheet. (Much like I enter variable names and literal values into a plot region to define the plot data and axis extents, etc.) Each placeholder is decorated with the name of the input.
  • Zero or more placeholders that display the outputs of the referenced document. (Usually you would want at least one, but maybe there's a scenario where the referenced worksheet has side effects (like writing to disk?) that could make a zero-output reference useful.) Each placeholder is decorated with the name of the output. I can easily choose which (if any) of the ouputs I want to assign to variables in my document. (details of this process remain TBD)

 

Step 3) Profit!

(edited to try for better formatting)

olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.