Solved

Adding log file to script (VBscript)

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now