Solid Edge Framework Type Library
GetRange Method
Description
Returns the minimum and maximum points of the range for the referenced object.
Syntax
Visual Basic
Public Sub GetRange( _
   ByRef LowValue As String, _
   ByRef Condition As Integer, _
   ByRef HighValue As String _
) 
Parameters
LowValue
Condition
HighValue
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeframework.Application
    Dim objDoc As SolidEdgepart.PartDocument
    Dim objVars As SolidEdgeframework.Variables
    Dim objVar1 As SolidEdgeframework.variable
    Dim strVar As String
    Dim strFormula As String
    Dim strLVal As String
    Dim strHVal As String
    Dim lngCnd As Long
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' Open the TestCase file
    Set objDoc = objApp.Documents.Open(Filename:="T:\vbtests\TestCases\Variables.par")
    ' Add a new Variable to the already existing Variables
    Set objVars = objDoc.Variables
    ' Set the Variable name and Formula
    strVar = "MyVar"
    strFormula = "2*Height"
    Set objVar1 = objVars.Add(pName:=strVar, pFormula:=strFormula, UnitsType:=igUnitDistance)
    ' Get the Range of Variable
    Call objVar1.GetRange(LowValue:=strLVal, Condition:=lngCnd, HighValue:=strHVal)

    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objVars = Nothing
    Set objVar1 = Nothing
End Sub
See Also

variable Object  | variable Members

Send comments on this topic.