Solid Edge Framework Type Library
Translate Method
Specifies the name of the Variable object to retrieve.
Description
Returns the corresponding Variable object with a specified variable name.
Syntax
Visual Basic
Public Function Translate( _
   ByVal pName As String _
) As Object
Parameters
pName
Specifies the name of the Variable object to retrieve.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeframework.Application
    Dim objDoc As SolidEdgepart.PartDocument
    Dim objVariables As SolidEdgeframework.Variables
    Dim objVariable As SolidEdgeframework.variable
    Dim objVar1 As SolidEdgeframework.variable
    ' 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
    'Get Variables Collection
    Set objVariables = objDoc.Variables
    'Create a variable with Add method
    Set objVariable = objVariables.Add(pName:="Variable1", pFormula:="100.0")
    'Get the Variable object with Translate method
    Set objVar1 = objVariables.Translate(pName:="Variable1")
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objVariables = Nothing
    Set objVariable = Nothing
    Set objVar1 = Nothing
End Sub
See Also

Variables Collection  | Variables Members