Solved

Adding log file to script (VBscript)

Posted on 2007-12-04
5
2,987 Views
Last Modified: 2011-10-03
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
Comment
Question by:froggy_bill
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20408385
Is this vbscript or vba code used in macros?

What is the output you get from this?

regards
Chandru
0
 

Author Comment

by:froggy_bill
ID: 20408587
Is technically called SAX Basic from Embarcadero's ERStudio. It is based on VBScript
0
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20408640
0
 

Author Comment

by:froggy_bill
ID: 20414293
Yes, but this only apparently works on IBM platforms. I need it to work on Oracle or SQL
0
 
LVL 4

Accepted Solution

by:
MeCanHelp earned 500 total points
ID: 20414892
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question