AnsweredAssumed Answered

How to get/set  the 2nd dimension text? (in SW 2015 SP2.1)

Question asked by Andreas Killer on Mar 31, 2015
Latest reply on Mar 31, 2015 by Deepak Gupta

Hello,

 

I'm not sure if "2nd dimension text" is the correct term, I mean "75h7" in this picture (red marked):

Unbenannt.png

 

I tried to use the GetText method but it seems that I can access only the 1st dimension text:

 

Sub Test()
  Dim swApp As SldWorks.SldWorks
  Dim swFeat As SldWorks.Feature
  Dim swDispDim As SldWorks.DisplayDimension
  Dim swDim As SldWorks.Dimension
  Dim i As Long

 

  Set swApp = Application.SldWorks
  Set swModel = swApp.ActiveDoc
  Set swFeat = swModel.GetActiveSketch2
 
  Set swDispDim = swFeat.GetFirstDisplayDimension
  Do While Not swDispDim Is Nothing
    Set swDim = swDispDim.GetDimension
    Debug.Print swDim.FullName
    For i = 0 To 8
      Debug.Print i, swDispDim.GetText(i)
    Next
    'swDispDim.SetText x, "Whatever"
    Set swDispDim = swFeat.GetNextDisplayDimension(swDispDim)
  Loop
End Sub

 

Any ideas?

 

Andreas.

Outcomes