[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3047
  • Last Modified:

Adding log file to script (VBscript)

How would I add a Word log file that cotains the output of the code below?
Sub Main
Dim mdl As Model
Dim myview As View
Set mdl = DiagramManager.ActiveDiagram.ActiveModel
For Each myview In mdl.Views
myview.SetViewDDL(myview.ViewDDL)
Next
End Sub

Open in new window

0
froggy_bill
Asked:
froggy_bill
  • 2
  • 2
1 Solution
 
chandru_solCommented:
Is this vbscript or vba code used in macros?

What is the output you get from this?

regards
Chandru
0
 
froggy_billAuthor Commented:
Is technically called SAX Basic from Embarcadero's ERStudio. It is based on VBScript
0
 
chandru_solCommented:
0
 
froggy_billAuthor Commented:
Yes, but this only apparently works on IBM platforms. I need it to work on Oracle or SQL
0
 
MeCanHelpCommented:
See if this helps

Sub Main
Dim mdl As Model
Dim myview As View
Const ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
    ("c:\report.txt", ForAppending, True)

Set mdl = DiagramManager.ActiveDiagram.ActiveModel

For Each myview In mdl.Views
objTextFile.WriteLine(myview.SetViewDDL(myview.ViewDDL))
Next
End Sub
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now