title: How to display Parameter Window data to a Label in VISIO
body: <p>I am trying to assign value to a LABEL in VISIO. But it is not working. Can you help me.</p>
  <p>After I drag and drop my component on the right click I am giving an option &quot;ADD STATION&quot; this will add a LABEL to the component and after that I want to get value from the Parameter window and display it into the LABEL.</p>
  <p>I am able to generate the LABEL on a button click I want some help to display the Value.</p>
  <pre><code> Public Sub AddParameterToLabel(ByRef oLabel As Visio.Shape, ByRef sObjID As String, ByRef sParameterName As String, ByVal sPreText As String, ByVal bShow As Boolean)
  
      Dim sRowName As String = &quot;Parameter&quot;
      Dim iCurrentRow As Integer = oLabel.AddNamedRow(visSectionUser, sRowName, 0)
  
      If (Err.Number &lt;&gt; 0) Then
          Err.Clear()
          Dim iAddRow As Integer = oLabel.AddNamedRow(visSectionUser, &quot;VisioSucks3&quot;, 0)
          oLabel.CellsSRC(visSectionUser, iAddRow, 1).RowName = sRowName
          iCurrentRow = iAddRow
      End If
      Dim ovCell As Visio.Cell = oLabel.CellsSRC(visSectionUser, iCurrentRow, visUserValue)
  
      Dim sParent As String = sObjID
      If (Len(sObjID) &gt; 0) Then
          sParent = sObjID &amp; DOT
      End If
  
      Dim oParam As Object.Interop.Param
      oParam = g_oObject.Param(sParent &amp; sParameterName)
      Dim sPacked As String
      If (Err.Number &lt;&gt; 0) Then
          sPacked = &quot;|-1|1|0|||||&quot;
      Else
          'Add parameters with the unit conversions, as specified by the current choice
          sPacked = sParameterName &amp; &quot;|&quot; &amp;
                    oParam.SigFigs &amp; &quot;|&quot; &amp;
                    oParam.MultiplierToUserUnit &amp; &quot;|&quot; &amp;
                    oParam.AdderToUserUnit &amp; &quot;|&quot; &amp;
                    &quot;|&quot; &amp;
                    sPreText &amp; &quot;|&quot; &amp;
                    &quot;|&quot; &amp;
                    &quot;g&quot; &amp; oParam.SigFigs &amp; &quot;|&quot; &amp;
                    &quot;User&quot; &amp; &quot;|&quot; &amp;
                    oParam.UserUnitsString
      End If
  
      If Not oParam Is Nothing Then
          System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oParam)
          oParam = Nothing
      End If
  
      ovCell.FormulaU = FormatStringForVisioOrSQL(sPacked)
      oLabel.CellsSRC(visSectionUser, iCurrentRow, visUserPrompt).Result(visNoCast) = Math.Abs(CInt(bShow))
      oLabel.Cells(&quot;Actions.Action[1]&quot;).Trigger()
  
  End Sub
  </code></pre>
  <p>The &quot;ParameterName = Compressor.StationFrom&quot; which I am getting here.
  and the value StationFrom will be having is DOUBLE i.e 1.2,1.3 etc..</p>