Hide Table of Contents
GetDimensionDisplayString5 Method (IView)

Gets all of the dimension text in the current drawing sheet or the current drawing view.

.NET Syntax

Visual Basic (Declaration) 
Function GetDimensionDisplayString5( _
   ByRef DimensionSize As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IView
Dim DimensionSize As System.Integer
Dim value As System.Object
 
value = instance.GetDimensionDisplayString5(DimensionSize)
C# 
System.object GetDimensionDisplayString5( 
   out System.int DimensionSize
)
C++/CLI 
System.Object^ GetDimensionDisplayString5( 
&   [Out] System.int DimensionSize
) 

Parameters

DimensionSize
Number of strings for each dimension (see Remarks)

Return Value

Array of strings (see Remarks)

Example

'VBA

' Open a drawing that has one or more display dimensions

'=============================================

Dim swApp As SldWorks.SldWorks

Dim swModel As ModelDoc2

Dim swDraw As DrawingDoc

Dim swView As View

Option Explicit

Sub main()

    Set swApp = Application.SldWorks

    Set swModel = swApp.ActiveDoc

   

    Set swDraw = swModel

   

    Dim views As Variant

    views = swDraw.GetViews()

   

    Set swView = views(0)(0)

    Dim var As Variant

    Dim size As Long

    var = swView.GetDimensionDisplayString5(size)

   

    Debug.Print "Number of strings in returned array: " & UBound(var) + 1

    Debug.Print "Number of strings for each display dimension: " & size

End Sub

Remarks

This method returns a string array of size (DimensionSize) x (number_of_dimensions_in_view).

This set of values returned for each dimension in the view:

[ value1, tolMax1 tolMin1, value2, tolMax2, tolMin2, prefix, suffix, callout1, callout2, bottom ]

where:

value1 = Primary Dimension Value

tolMax1 = Maximum Variation for value1

tolMin1 = Minimum Variation for value1

value2 = Dual Dimension Value

tolMax2 = Maximum Variation for value2

tolMin2 = Minimum Variation for value2

prefix = Text before value1

suffix = Text after value1

callout1 = Text above prefix<value1>suffix

callout2 = Text below prefix<value1>suffix

bottom = Text below callout2

The Dimension PropertyManager page (PMP) contains two Dimension Text boxes. Add dimension text by entering prefix, suffix, callout1, and callout2 texts in the first Dimension Text box. Enter bottom text in the second Dimension Text box.

If any of the above values are not used in the dimension, then those values are returned as empty strings in the returned array of this method.

For more information, see SOLIDWORKS user-interface help > Detailing and Drawings > Drawings > Dimensions in Drawings > Dimension Value PropertyManager.

NOTES:

  • A previous version of this method, IView::GetDimensionDisplayString2, detects and overlooks dangling dimensions. This method neither overlooks nor indicates that any dimensions are dangling. Use IView::GetDimensionDisplayString2 if you need dangling dimensions detected and overlooked.
  • This method does not support hole callouts.
 

See Also

Availability

SOLIDWORKS 2024 SP02, Revision Number 32.2


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   GetDimensionDisplayString5 Method (IView)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2024 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.