Your Products have been synced, click here to refresh
Sub GetSettingLangStr() Dim oApp As PCDLRN.Application Dim oPart As PCDLRN.PartProgram Dim oCmds As PCDLRN.Commands Dim oCmd As PCDLRN.Command Dim i As Long Dim bRet As Boolean Dim sStr As String Dim Result As Variant On Error GoTo ErrCatcher Set oApp = CreateObject("PCDLRN.Application") Set oPart = oApp.ActivePartProgram Set oCmds = oPart.Commands oApp.Visible = False For i = -1 To -1000 Step -1 Set oCmd = oCmds.Add(ASSIGNMENT, True) oCmd.Marked = True bRet = oCmd.PutText("V4", DEST_EXPR, 0) sStr = "GETSETTING(" & Chr(34) & "LangStr(" & i & ")" & Chr(34) & ")" bRet = oCmd.PutText(sStr, SRC_EXPR, 0) Set oCmd = oCmds.Add(SET_COMMENT, True) oCmd.Marked = True bRet = oCmd.PutText("", ID, 0) bRet = oCmd.SetToggleString(2, COMMENT_TYPE, 0) sStr = Chr(34) & i & ": " & Chr(34) bRet = oCmd.PutText(sStr, COMMENT_FIELD, 1) sStr = Chr(34) & i & ": " & Chr(34) & "+V4" Result = oCmd.SetExpression(sStr, COMMENT_FIELD, 1) Next i oApp.Visible = True oPart.RefreshPart ExitSub: Set oCmd = Nothing Set oCmds = Nothing Set oPart = Nothing Set oApp = Nothing Exit Sub ErrCatcher: MsgBox ("Error: " & Err.Number & vbCrLf & "Description: " & Err.Description) On Error GoTo 0 Resume ExitSub End Sub
Sub GetSettingLangStr() Dim oApp As PCDLRN.Application Dim oPart As PCDLRN.PartProgram Dim oCmds As PCDLRN.Commands Dim oCmd As PCDLRN.Command Dim i As Long Dim bRet As Boolean Dim sStr As String Dim Result As Variant On Error GoTo ErrCatcher Set oApp = CreateObject("PCDLRN.Application") Set oPart = oApp.ActivePartProgram Set oCmds = oPart.Commands oApp.Visible = False For i = -1 To -1000 Step -1 Set oCmd = oCmds.Add(ASSIGNMENT, True) oCmd.Marked = True bRet = oCmd.PutText("V4", DEST_EXPR, 0) sStr = "GETSETTING(" & Chr(34) & "LangStr(" & i & ")" & Chr(34) & ")" bRet = oCmd.PutText(sStr, SRC_EXPR, 0) Set oCmd = oCmds.Add(SET_COMMENT, True) oCmd.Marked = True bRet = oCmd.PutText("", ID, 0) bRet = oCmd.SetToggleString(2, COMMENT_TYPE, 0) sStr = Chr(34) & i & ": " & Chr(34) bRet = oCmd.PutText(sStr, COMMENT_FIELD, 1) sStr = Chr(34) & i & ": " & Chr(34) & "+V4" Result = oCmd.SetExpression(sStr, COMMENT_FIELD, 1) Next i oApp.Visible = True oPart.RefreshPart ExitSub: Set oCmd = Nothing Set oCmds = Nothing Set oPart = Nothing Set oApp = Nothing Exit Sub ErrCatcher: MsgBox ("Error: " & Err.Number & vbCrLf & "Description: " & Err.Description) On Error GoTo 0 Resume ExitSub End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |