Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to create multiple parameters in Business components through vbscript
#1
The below program has found from one of the portal and successful to create the Business component through the script and tried several ways to create the more input parameters and output parameters, but not able to create, if any one knows how to create the 5 parameters then it really helps, please help me


Code:
Set objQcConnection = CreateObject("TDApiOle80.TDConnection.1")
objQcConnection.InitConnectionEx "<QC URL>"
objQcConnection.Login "<Username>","<PassworD>"
objQcConnection.Connect "<Domain>","<Project>"

     Dim objQcComponentFolderFactory : Set objQcComponentFolderFactory = objQcConnection.ComponentFolderFactory
    
    strComponentPath = "Components\Data_Components"
    
     Dim objQcComponentFolder : Set objQcComponentFolder = objQcComponentFolderFactory.FolderByPath(strComponentPath)
     Dim objQcComponentFactory : Set objQcComponentFactory = objQcComponentFolder.ComponentFactory
     Dim objQcComponent : Set objQcComponent = objQcComponentFactory.AddItem(Null)
    
     objQcComponent.Name = "VBS Component"
     objQcComponent.Field("CO_DESC") = "Dummy Component created by vb script"
     objQcComponent.ScriptType = "QT-SCRIPTED"
     objQcComponent.Post
    
     Dim objQcComponentParamFactory : Set objQcComponentParamFactory = objQcComponent.ComponentParamFactory
         Set objQcComponentParam = objQcComponentParamFactory.AddItem(Null)
         objQcComponentParam.IsOut = 0  
         objQcComponentParam.Name = "Parameter1"
         objQcComponentParam.Desc = "Dummy"
         objQcComponentParam.ValueType = "String"
         objQcComponentParam.Order = 1        
        objQcComponentParam.Post
      
   objQcComponent.Post
    
    
      'Release all objects
      Set objQcComponentParam = Nothing
      Set objQcComponentParamFactory = Nothing
      Set objQcComponent = Nothing
      Set objQcComponentFactory = Nothing
      Set objQcComponentFolder = Nothing
      Set objQcComponentFolderFactory = Nothing
      Set objQcConnection = Nothing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)