Solved

Adding log file to script (VBscript)

Posted on 2007-12-04
5
2,978 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
A short article about problems I had with the new location API and permissions in Marshmallow
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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