Your Products have been synced, click here to refresh
Sub Main Dim App As Object Set App = CreateObject ("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Ew As Object Set Ew = Part.EditWindow Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object ' Selects the command where the cursor is EW.SelectCommand ' Sets the current command as the command object Dim myCommand as Object Set myCommand = Cmds.CurrentCommand ' Executes the current command MsgBox "Command Selected. Attempting to execute command." myCommand.Execute ' Refreshes Part.RefreshPart End Sub
Hi Carlos silva maybe something like this is what you want. You could then tie it to a custom button or menu option:
Sub Main Dim App As Object Set App = CreateObject ("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Ew As Object Set Ew = Part.EditWindow Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object ' Selects the command where the cursor is EW.SelectCommand ' Sets the current command as the command object Dim myCommand as Object Set myCommand = Cmds.CurrentCommand ' Executes the current command MsgBox "Command Selected. Attempting to execute command." myCommand.Execute ' Refreshes Part.RefreshPart End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |