cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davidg
Level 4

ActiveX component can't create object: 'IswiAuto16.ISWiPathVariable'

Hello,

I am trying to update my project path variables using automation in the form of vbscript, and I keep getting the following error:

"(24, 1) ActiveX component can't create object: 'IswiAuto16.ISWiPathVariable'".


Any ideas?

Dim StdIn, StdOut
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut

Set m_ISWiProject = CreateObject("IswiAuto16.ISWiProject")

' Open Project
strFile = "My.ism"

m_ISWiProject.OpenProject strFile


Set pvs = CreateObject("IswiAuto16.ISWiPathVariables")

Set pvs = m_ISWiProject.ISWiPathVariables

For count = 0 to pvs.Count

Set pv = CreateObject("IswiAuto16.ISWiPathVariable")
Set pv = pvs.Item(count)


Next

StdOut.WriteLine "Saving Project"

m_ISWiProject.SaveProject


StdOut.WriteLine "Closing Project"

m_ISWiProject.CloseProject


Regards,
Davidg
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

I think that you need to remove the CreateObject("IswiAuto16.ISWiPathVariables") and CreateObject("IswiAuto16.ISWiPathVariable") calls from your script.
0 Kudos
davidg
Level 4

I did not get a chance to implement these changes as I switched to the C# Automation Library. When I noticed that the first IswiAuto16.ISWiPathVariable was null, I am thinking this is why it had troubles.

Anyways thanks for the help,
davidg
0 Kudos