Jon Hodge - Wednesday, January 31, 2007 9:20 AM:
Excel, and any other program which uses VBA as a macro language, can act as an Innovator client using the ArasIOMActiveX.dll. You need be familiar with the built in Visual Basic Editor in Excel. The steps are:
1) Extract ArasIOMActiveX.dll from /Innovator/client/cbin/ArasIOM.cab to windows/system32 (or other path)
2) From windows Start>Run regsvr32 ArasIOMActiveX.dll (or with alternate path)
3) In VBA editor Add Reference to ArasIOMActiveX.dll.
Now you can create Innovator items as in the following fragments. The commit sub enables you to either send AML to the server or save it to a file.
Sub newTemplate()
Dim oInnov As New Innovator
With oInnov.credentials
.setInnovatorServerURL InnovatorServerURL
.setDatabase Database
.setLoginName LoginName
.setPassword Password
End With
Set result = oInnov.login
If result.IsError() Then
MsgBox "Error at logon " & vbCrLf & result.getErrorDetail
Exit Sub
End If
Dim iTopWBS: Set iTopWBS = oInnov.newItem
With iTopWBS
.setAttribute "id", Cells(1, 3)
.setType "Project Template"
.setProperty "name", Cells(1, Name)
.setProperty "wbs_id", Cells(1, ID)
.setAction "merge"
commit iTopWBS
End With
End Sub
Sub commit(item)
If fileName = "" Then
Set result = item.Apply
If result.IsError() Then
MsgBox "Error row at Top WBS" & vbCrLf & result.getErrorDetail
Exit Sub
End If
Else
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(filePath & fileName, 8)
f.WriteLine (item.node.XML)
f.Close
End If
End Sub
dbhiggi - Tuesday, May 24, 2011 5:23 PM:
Is there a contemporary version to this? I can't find ArasIOMActiveX.dll in my distribution. I do find IOM.dll, but it has problems when running regsvr on it.
Thanks.