hexagon logo

Excel VBA .add BASIC_SCRIPT modifiers

Hello

I am trying to use excel vba to add a script to the end of all the programs in a directory. I am stuck on the DmisCommands.Add(BASIC_SCRIPT, True).

Is there a modifier to specify the function/ and a modifier to add ARGs? And if possible where can I look up this information?

Set DmisCommand = DmisCommands.Add(BASIC_SCRIPT, True)
DmisCommand.Marked = True
DmisCommand.ID = "CS998"
retval = DmisCommand.PutText("C:\PC-DMIS\MKDIR.BAS", FILE_NAME, 1)
Parents
  • good day,
    iam not shure how relevant this is now, but here you go

    Sub Test
      Dim DmisApp As Object
      Dim DmisPart As Object
      Dim DmisCommands As Object
      Dim DmisCommand As Object
    
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
      Set DmisCommands = DmisPart.Commands
      CommandCount = DmisCommands.Count
      Set DmisCommand = DmisCommands.Item(CommandCount)
      DmisCommands.InsertionPointAfter DmisCommand
    
    
      Set DmisCommand = DmisCommands.Add(BASIC_SCRIPT, True)
      DmisCommand.Marked = False
      retval = DmisCommand.PutText ("CS1", ID, 0)   'Name of command In pcDMIS
      retval = DmisCommand.PutText ("C:\USERS\QS\DESKTOP\TEST.BAS", FILE_NAME, 0)   'path To .bas file
      retval = DmisCommand.PutText ("Main", SUB_NAME, 0)   'name of sub
      retval = DmisCommand.SetToggleString (2, SHOW_DETAILS, 0)
    
    
      DmisPart.RefreshPart
    End Sub
    
Reply
  • good day,
    iam not shure how relevant this is now, but here you go

    Sub Test
      Dim DmisApp As Object
      Dim DmisPart As Object
      Dim DmisCommands As Object
      Dim DmisCommand As Object
    
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
      Set DmisCommands = DmisPart.Commands
      CommandCount = DmisCommands.Count
      Set DmisCommand = DmisCommands.Item(CommandCount)
      DmisCommands.InsertionPointAfter DmisCommand
    
    
      Set DmisCommand = DmisCommands.Add(BASIC_SCRIPT, True)
      DmisCommand.Marked = False
      retval = DmisCommand.PutText ("CS1", ID, 0)   'Name of command In pcDMIS
      retval = DmisCommand.PutText ("C:\USERS\QS\DESKTOP\TEST.BAS", FILE_NAME, 0)   'path To .bas file
      retval = DmisCommand.PutText ("Main", SUB_NAME, 0)   'name of sub
      retval = DmisCommand.SetToggleString (2, SHOW_DETAILS, 0)
    
    
      DmisPart.RefreshPart
    End Sub
    
Children
No Data