Get list of ALM project domains and names in VBScript

  • Questions
  • Get list of ALM project domains and names in VBScript
Question ID: 105093
0
0

Has anyone had any luck with getting a list of a user’s project domains and project names using VBA? I’m trying to login through Excel and extract the information but I’ve hit a block.

This is what I have at the moment:

Set tdc = CreateObject("TDApiOle80.TDConnection")

tdc.Login username, password
Set projectList = CreateObject("TDApiOle80.List")
projectList = tdc.GetAllVisibleProjectDescriptors()

For Each project In projectList
combo_domain.AddItem (project.Name)
combo_project.AddItem (project.DomainName)
Next project

The code above throws an error of invalid property or wrong number of arguments on the tdc.GetAllVisibleProjectDescriptors() line but I don’t know why. Any idea how to either fix this or look at another approach for getting the information I need?

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on August 5, 2013 1:28 pm
67 views
Answers (2)
1
Private answer

Try eliminating line 4 entirely

set projectList = CreateObject...

and just put a ''set'' in front of line 5, and drop the parentheses

set projectList=tdc.GetAllVisibleProjectDescriptors

Marked as spam
Posted by (Questions: 1, Answers: 101)
Answered on August 5, 2013 11:03 pm
0
Private answer

Dim QCConnection
'Return the TDConnection object.
Set QCConnection = CreateObject(''TDApiOle80.TDConnection'')

Dim sUserName, sPassword
sUserName = txtUname.Text
sPassword = txtPass.Text
Application.ScreenUpdating = False

QCConnection.InitConnectionEx ''http://tac-qc-prod.cibc.com/qcbin/''
QCConnection.Login sUserName, sPassword

Set projectList = QCConnection.GetAllVisibleProjectDescriptors

For Each project In projectList
cmbdom.AddItem (project.DomainName)
cmbprj.AddItem (project.Name)

Next project

Not giving appropriate Result
Giving me output as this one
Domain ( have only 2 domain)
D1
D1
D1
D1
D2

Project
P1
p2
p3
p4
(p1 to p4 are from the First domain)
p5 (from 2nd domain)

Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on February 16, 2017 2:14 pm
@ND2610, were you able to resolve this issue? Im needing help on this as well.
( at February 11, 2019 7:54 pm)