<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic extracting matrix values from mathcad to Excel in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774785#M199496</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am not able to extract my calculated matrix from mathcad prime 7 to excel. I was able to hand over parameters from excel to mathcad and now i want to retrieve the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim matrix As IMathcadPrimeOutputMatrixResult&lt;BR /&gt;Set matrix = WS.OutputGetMatrixValue("test")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From there I would extract all the elements one by one.&lt;/P&gt;&lt;P&gt;I also changed the outputalias from "out" to "test" but I only receive the ErrorCode 7 "Matrix result is invalide".&lt;/P&gt;&lt;P&gt;Can somebody give me a general example how I can retrieve my results into Excel by the api.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 14:41:02 GMT</pubDate>
    <dc:creator>JF_9255051</dc:creator>
    <dc:date>2022-01-26T14:41:02Z</dc:date>
    <item>
      <title>extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774785#M199496</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am not able to extract my calculated matrix from mathcad prime 7 to excel. I was able to hand over parameters from excel to mathcad and now i want to retrieve the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim matrix As IMathcadPrimeOutputMatrixResult&lt;BR /&gt;Set matrix = WS.OutputGetMatrixValue("test")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From there I would extract all the elements one by one.&lt;/P&gt;&lt;P&gt;I also changed the outputalias from "out" to "test" but I only receive the ErrorCode 7 "Matrix result is invalide".&lt;/P&gt;&lt;P&gt;Can somebody give me a general example how I can retrieve my results into Excel by the api.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 14:41:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774785#M199496</guid>
      <dc:creator>JF_9255051</dc:creator>
      <dc:date>2022-01-26T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774788#M199498</link>
      <description>&lt;P&gt;You may want to have a look here &lt;A href="https://community.ptc.com/t5/PTC-Mathcad/API-Prime-7-Excel-Matrix-passing-issues/m-p/772394" target="_blank"&gt;https://community.ptc.com/t5/PTC-Mathcad/API-Prime-7-Excel-Matrix-passing-issues/m-p/772394&lt;/A&gt; and here &lt;A href="https://community.ptc.com/t5/PTC-Mathcad/API-Excel-and-Prime-VBA-timing-issues/td-p/773081" target="_blank"&gt;https://community.ptc.com/t5/PTC-Mathcad/API-Excel-and-Prime-VBA-timing-issues/td-p/773081&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;/P&gt;
&lt;P&gt;Luc&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 14:47:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774788#M199498</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2022-01-26T14:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774921#M199506</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to communicate one solution back, but I want to send a matrix back.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 09:35:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/774921#M199506</guid>
      <dc:creator>JF_9255051</dc:creator>
      <dc:date>2022-01-27T09:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775100#M199519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Attach you Prime worksheet and your coding so far.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 22:49:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775100#M199519</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2022-01-27T22:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775131#M199522</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Using visual basic this file shows how to input a matrix into Prime worksheet and how to output a matrix from Prime worksheet.&amp;nbsp; Alias is used.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 822px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51849i17F6F255A78F5D28/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 455px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51855iBE5EBD169E8C10C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 639px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51852i8D70C2ADD60385C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code that achieves this is&lt;/P&gt;
&lt;P&gt;Snip&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;Imports Ptc.MathcadPrime.Automation&lt;/P&gt;
&lt;P&gt;Public Class Form1&lt;BR /&gt;Private MCApp As Ptc.MathcadPrime.Automation.ApplicationCreator&lt;BR /&gt;Private WS As Ptc.MathcadPrime.Automation.IMathcadPrimeWorksheet3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;BR /&gt;MCApp = New Ptc.MathcadPrime.Automation.ApplicationCreator&lt;BR /&gt;MCApp.Visible = True&lt;BR /&gt;Catch&lt;BR /&gt;MessageBox.Show("Issues starting Mathcad Prime")&lt;BR /&gt;End Try&lt;/P&gt;
&lt;P&gt;Dim Directory As String&lt;BR /&gt;Directory = System.AppDomain.CurrentDomain.BaseDirectory()&lt;BR /&gt;OpenFileDialog1.InitialDirectory = Directory&lt;BR /&gt;OpenFileDialog1.ShowDialog()&lt;BR /&gt;Try&lt;BR /&gt;WS = MCApp.Open(OpenFileDialog1.FileName)&lt;BR /&gt;Catch&lt;BR /&gt;MessageBox.Show("Couldn't open file, make sure you selected a valid file")&lt;BR /&gt;End Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim pI As IMathcadPrimeInputs&lt;BR /&gt;pI = WS.Inputs&lt;BR /&gt;Dim c As Integer&lt;BR /&gt;c = pI.Count&lt;BR /&gt;Dim alias1 As String&lt;BR /&gt;alias1 = pI.GetAliasByIndex(0)&lt;/P&gt;
&lt;P&gt;Dim pO As IMathcadPrimeOutputs&lt;BR /&gt;pO = WS.Outputs&lt;BR /&gt;Dim b As Integer&lt;BR /&gt;b = pO.Count&lt;BR /&gt;Dim alias2 As String&lt;BR /&gt;alias2 = pO.GetAliasByIndex(0)&lt;BR /&gt;WS.SetRealValue(alias1, 11.5, "km")&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TextBox1.Text = alias1 + " - " + alias2&lt;/P&gt;
&lt;P&gt;Dim i As Integer&lt;BR /&gt;Dim matrixValue As IMathcadPrimeMatrix&lt;BR /&gt;matrixValue = WS.CreateMatrix(3, 3)&lt;/P&gt;
&lt;P&gt;i = matrixValue.SetMatrixElement(0, 0, 2.5)&lt;BR /&gt;i = matrixValue.SetMatrixElement(0, 1, 4.0)&lt;BR /&gt;i = matrixValue.SetMatrixElement(0, 2, 3.1)&lt;BR /&gt;i = matrixValue.SetMatrixElement(1, 0, 1.5)&lt;BR /&gt;i = matrixValue.SetMatrixElement(1, 1, 3.6)&lt;BR /&gt;i = matrixValue.SetMatrixElement(1, 2, 5.0)&lt;BR /&gt;i = matrixValue.SetMatrixElement(2, 0, 7.2)&lt;BR /&gt;i = matrixValue.SetMatrixElement(2, 1, 4.8)&lt;BR /&gt;i = matrixValue.SetMatrixElement(2, 2, 6.8)&lt;/P&gt;
&lt;P&gt;WS.SetMatrixValue("B", matrixValue, "")&lt;/P&gt;
&lt;P&gt;Dim hereResult As IMathcadPrimeOutputMatrixResultAs&lt;BR /&gt;Dim rowCount, colCount As Integer&lt;/P&gt;
&lt;P&gt;hereResult = WS.OutputGetMatrixValueAs("here", "")&lt;BR /&gt;rowCount = hereResult.MatrixResult.Rows&lt;BR /&gt;colCount = hereResult.MatrixResult.Columns&lt;/P&gt;
&lt;P&gt;Dim dblhere As Double&lt;/P&gt;
&lt;P&gt;For i = 0 To rowCount - 1&lt;BR /&gt;For j = 0 To colCount - 1&lt;BR /&gt;hereResult.MatrixResult.GetMatrixElement(i, j, dblhere)&lt;BR /&gt;RichTextBox1.AppendText(dblhere.ToString)&lt;BR /&gt;RichTextBox1.AppendText(", ")&lt;BR /&gt;Next j&lt;BR /&gt;RichTextBox1.AppendText(Microsoft.VisualBasic.ControlChars.NewLine)&lt;BR /&gt;Next i&lt;BR /&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click&lt;BR /&gt;Try&lt;BR /&gt;MCApp.Quit(Ptc.MathcadPrime.Automation.SaveOption.spDiscardChanges)&lt;BR /&gt;Catch&lt;BR /&gt;MessageBox.Show("Couldn't close Mathcad Prime, make sure Mathcad Prime is running and all changed worksheets are closed")&lt;BR /&gt;End Try&lt;BR /&gt;End Sub&lt;BR /&gt;End Class&lt;/P&gt;
&lt;P&gt;Snip&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 06:06:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775131#M199522</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2022-01-28T06:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775289#M199538</link>
      <description>&lt;P&gt;Why not use READEXCEL? It seems like you might be reinventing the wheel. You can set the inputs of READEXCEL as variables, and your variables are concatenated strings. As long as you can pass strings to variables and variables to READEXCEL, then you can extract whatever you want from it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinFinity_0-1643391915705.png" style="width: 630px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51891iD80620D7C3E6AB8A/image-dimensions/630x106?v=v2" width="630" height="106" role="button" title="KevinFinity_0-1643391915705.png" alt="KevinFinity_0-1643391915705.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 17:46:03 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775289#M199538</guid>
      <dc:creator>KevinFinity</dc:creator>
      <dc:date>2022-01-28T17:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775361#M199549</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;No example exists in Help for Visual Basic For Applications VBA using the Prime API to input and output matrices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here it is.&amp;nbsp; This is a long post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enclosed are two files an Excel 2019 spreadsheet and a Prime 7 worksheet.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 778px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51903iEEE6604B8278466C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Prime 7 worksheet has two inputs and two outputs declared.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture7.JPG" style="width: 456px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51908iB2ED22967D569346/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture7.JPG" alt="Capture7.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Excel worksheet has nothing but a command button that runs Macro1 when clicked&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 318px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51904i25D1A0B07BCA225A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Macro1 only shows a VBA form.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.jpg" style="width: 394px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51905iC2365C61FED877F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.jpg" alt="Capture4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The VBA Form has a Go button.&amp;nbsp; Press the Go button and the excel subroutine associated with the click of the button does a few things&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.JPG" style="width: 794px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51906i78907875698DCA3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture5.JPG" alt="Capture5.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;a) It Runs Prime and opens the worksheet.&amp;nbsp; The location is simply coded in VBA so Path and Filename will need to be adjusted for where you save the two files.&lt;/P&gt;
&lt;P&gt;b) It Inputs into Prime a value with units and a matrix.&amp;nbsp; &amp;nbsp;The values are coded in VBA.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; The example does not show how values can be extracted from Excel to VBA as this is covered by VBA Help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; The example does not cover how values in VBA are sent to Excel as this is covered in VBA Help.&lt;/P&gt;
&lt;P&gt;c) It Outputs from Prime the names of the first Inputs and Outputs the output matrix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;d) It shows the Output matrix from Prime into a VBA text box.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture6.JPG" style="width: 562px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51907i2EA51CD3B902B828/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture6.JPG" alt="Capture6.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The VBA IDE needs to be set up so the PTC Automation is available to the VBA coding.&lt;/P&gt;
&lt;P&gt;Once this is done you get code completion highlights in the VBA IDE&lt;/P&gt;
&lt;P&gt;Use Tools | References to check mark against the PTC Automation option.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture8.JPG" style="width: 933px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51909i7F2482E558272DAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture8.JPG" alt="Capture8.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This brings up a dialog box where you can search for and check the PTC Automation Information.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture9.JPG" style="width: 451px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51911i1790B9159B714EC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture9.JPG" alt="Capture9.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Once this is done you can use the object browser of the VBA IDE to inspect the objects, properties, and methods of the PTC Automation&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture10.JPG" style="width: 417px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51912i12BB0854447DB271/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture10.JPG" alt="Capture10.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The PTC Automation is available in the drop down list of the object inspector.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From here you can inspect all the properties, methods of PTC Automation&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture11.JPG" style="width: 419px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51913i9851174F6FF56A1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture11.JPG" alt="Capture11.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VBA Coding is wholly enclosed in the subroutine "Private Sub CommandButton1_Click()"&lt;/P&gt;
&lt;P&gt;I will leave it for others to explore.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture12.JPG" style="width: 675px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/51914i6C2EEAD7AA3BCCDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture12.JPG" alt="Capture12.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The two files are included in enclosed zip file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 10:43:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775361#M199549</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2022-01-29T10:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: extracting matrix values from mathcad to Excel</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775894#M199591</link>
      <description>&lt;P&gt;Thank you very much for your support,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I finally got it to work with the following script that fills the array q in VBA with the results from MathCad:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oe As Ptc_MathcadPrime_Automation.OutputMatrixResult&lt;BR /&gt;Dim rowCount, colCount As Integer&lt;BR /&gt;Dim dblhere As Double&lt;BR /&gt;Dim q As Variant&lt;BR /&gt;Dim d As Long&lt;BR /&gt;&lt;BR /&gt;Set oe = WS.OutputGetMatrixValue("test")&lt;BR /&gt;&lt;BR /&gt;rowCount = oe.MatrixResult.Rows&lt;BR /&gt;colCount = oe.MatrixResult.Columns&lt;BR /&gt;&lt;BR /&gt;ReDim q(rowCount - 1, colCount - 1)&lt;BR /&gt;&lt;BR /&gt;For i = 0 To rowCount - 1&lt;BR /&gt;For j = 0 To colCount - 1&lt;BR /&gt;d = oe.MatrixResult.GetMatrixElement(i, j, dblhere)&lt;BR /&gt;q(i, j) = dblhere&lt;BR /&gt;Next j&lt;BR /&gt;Next i&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 07:52:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/extracting-matrix-values-from-mathcad-to-Excel/m-p/775894#M199591</guid>
      <dc:creator>JF_9255051</dc:creator>
      <dc:date>2022-02-02T07:52:00Z</dc:date>
    </item>
  </channel>
</rss>

