0% found this document useful (0 votes)
77 views6 pages

FPT - Open Link: FPT Log Reader COM

hysys

Uploaded by

isabel_93_2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views6 pages

FPT - Open Link: FPT Log Reader COM

hysys

Uploaded by

isabel_93_2011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

FPT Open Link

FPT Log Reader COM

Schlumberger

FPTLogReader.dll

Proprietary Notice
Copyright 2000 - 2004 Schlumberger. All rights reserved.
No part of this document may be reproduced, stored in a retrieval system, or translated in any form or by any means,
electronic or mechanical, including photocopying and recording, without the prior written permission of Schlumberger.
Use of this product is governed by the License Agreement. Schlumberger makes no warranties, express, implied, or
statutory, with respect to the product described herein and disclaims without limitation any warranties of merchantability or
fitness for a particular purpose.

Patent information
Schlumberger ECLIPSE reservoir simulation software is protected by US Patents 6,018,497, 6,078,869 and 6,106,561,
and UK Patents GB 2,326,747 B and GB 2,336,008 B. Patents pending.

Service mark information


The following are all service marks of Schlumberger:
The Calculator, Charisma, ConPac, ECLIPSE 100, ECLIPSE 200, ECLIPSE 300, ECLIPSE 500, ECLIPSE Office, EDIT,
Extract, Fill, Finder, FloGeo, FloGrid, FloViz, FrontSim, GeoFrame, GRAF, GRID, GridSim, NWM, Open-ECLIPSE,
PetraGrid, PlanOpt, Pseudo, PVTi, RTView, SCAL, Schedule, SimOpt, VFPi, Weltest 200.

Trademark information
Silicon Graphics and IRIX are registered trademarks of Silicon Graphics, Inc. OpenGL and the oval logo are trademarks
or registered trademarks of Silicon Graphics, Inc. in the United States and/or other countries worldwide. OpenInventor and
WebSpace are trademarks of Silicon Graphics, Inc. IBM, AIX and LoadLeveler are registered trademarks of International
Business Machines Corporation. Sun, SPARC, Solaris, Ultra and UltraSPARC are trademarks or registered trademarks of
Sun Microsystems, Inc. Macintosh is a registered trademark of Apple Computer, Inc. UNIX is a registered trademark of
UNIX System Laboratories. Motif is a registered trademark of the Open Software Foundation, Inc. The X Window System
and X11 are registered trademarks of the Massachusetts Institute of Technology. PostScript and Encapsulated PostScript
are registered trademarks of Adobe Systems, Inc. OpenWorks and VIP are registered trademarks of Landmark Graphics
Corporation. Lotus, 1-2-3 and Symphony are registered trademarks of Lotus Development Corporation. Microsoft,
Windows, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP, Internet Explorer, Intellimouse, Excel,
Word and PowerPoint are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries. Netscape is a registered trademark of Netscape Communications Corporation. AVS is a registered
trademark of AVS Inc. ZEH is a registered trademark of ZEH Graphics Systems. Ghostscript and GSview are Copyright of
Aladdin Enterprises, CA. GNU Ghostscript is Copyright of the Free Software Foundation, Inc. Linux is Copyright of the
Free Software Foundation, Inc. IRAP is Copyright of Roxar Technologies. LSF is a registered trademark of Platform
Computing Corporation, Canada. VISAGE is a registered trademark of VIPS Ltd. Cosmo is a trademark and PLATINUM
technology is a registered trademark of PLATINUM technology, inc. PEBI is a trademark of Veritas DGC Inc./HOT
Engineering GmbH. Stratamodel is a trademark of Landmark Graphics Corporation. GLOBEtrotter, FLEXlm and
SAMreport are registered trademarks of GLOBEtrotter Software, Inc. CrystalEyes is a trademark of StereoGraphics
Corporation. Tektronix is a registered trade mark of Tektronix, Inc. GOCAD and JACTA are trademarks of T-Surf. Myrinet
is a trade name of Myricom, Inc. This product may include software developed by the Apache Software Foundation
(http://www.apache.org). Copyright (c) 1999-2001 The Apache Software Foundation. All rights reserved. MPI/Pro is a
registered trademark of MPI Software Technology, Inc. The TGS logo is a trademark of TGS, Inc.

Contact information
Web: www.sis.slb.com
Support:: Service

Desk

Schlumberger

FPTLogReader.dll

1. REVISION HISTORY

2. INTRODUCTION

3. SUPPORTED INTERFACES

4. DEPENDENCY MAP

5. METHODS AND PROPERTIES READER INTERFACE

6. EXAMPLE VBA CODE

Schlumberger

FPTLogReader.dll

1. Revision History
Version
2003 Edition 2

Author
PK

Date
December 2003

Comments
First Draft

2. Introduction
FPTLogReader.dll includes a COM compatible interface that can be used to read output from
the log output file generated by the Field Planning Tool (FPT).

3. Supported Interfaces
Reader: for reading FPT log files

4. Dependency Map
None

5. Methods and Properties Reader Interface

ReadLogFile (as boolean - True if successful, False if unsuccessful)


Reads an FPT (.log) output file
Input Parameters
FilePath as string
Directory file path that contains the log file (excluding the terminating \)
FileName as string
Name of the log file to be read (including the .log file extension)
ObjectType as string
The type of object for which data is to be read. Valid entries are as
follows:o SRSK PIPESIM-Net source or sink.
o NODE PIPESIM-Net model node.
o BRANCH PIPESIM-Net branch.
ObjectName as string
The name of the object for which data is to be read. (Note that this is
case sensitive.)
ValueType as string
The value type which is to be read for the specified ObjectName and
ObjectType. Valid ValueType depends upon the ObjectType as follows:o ObjectType(SRSK) = PRESSURE, OILRATE, WATERRATE,
GASRATE, CUMOIL, CUMWATER or CUMGAS
o ObjectType(NODE) = OILRATE, WATERRATE, GASRATE or
PRESSURE
o ObjectType(BRANCH) = OILIN, WATERIN, GASIN, OILOUT,
WATEROUT, GASOUT

Schlumberger

FPTLogReader.dll

Output Parameters
DataArray as array of doubles
2 dimensional array containing time in days versus the requested
ValueType for the given ObjectName and ObjectType.
The data returned in DataArray has the following units depending on the
ValueType
PRESSURE psia
OILRATE, OILIN, OILOUT STB/d
WATERRATE WATERIN, WATEROUT STB/d
GASRATE, GASIN, GASOUT scf/d
CUMOIL STB
CUMWATER STB
CUMGAS scf
NoOfTimeSteps as long
The number of time steps included in DataArray.
ErrorMessage as string
If ReadLogFile returns False then the reading of the log file has been
unsuccessful and ErrorMessage will contain a description of the
problem.

6. Example VBA Code


Sub Test()
'Reads a log file for user specified object and value, then outputs the
data to excel
'Dimension variables
Dim FileName As String, FilePath As String
Dim ObjectName As String, ObjectType As String, ValueType As String
Dim DataArray() As Double, NoOfTimeSteps As Long
Dim HaveError As Boolean, ErrorMessage As String
Dim LogReader As New FPTLogReader.Reader
Dim n As Integer
'Read input data from spreadsheet
Sheets("ReadLogFile").Select
FilePath = Range("FilePath")
FileName = Range("FileName")
ObjectName = Range("ObjectName")
ObjectType = Range("ObjectType")
ValueType = Range("ValueType")
'Call the read log file function
HaveError = LogReader.ReadLogFile(FilePath, FileName, ObjectType,
ObjectName, ValueType, DataArray, NoOfTimeSteps, ErrorMessage)
'If there has been an error then clear the output array and display the
message
'otherwise just output the data.
If HaveError = True Then
For n = 1 To 200
ActiveCell.Offset(n - 1, 0) = ""
ActiveCell.Offset(n - 1, 1) = ""
Next n
MsgBox (ErrorMessage)
Else

Schlumberger

Range("E4").Select
For n = 1 To NoOfTimeSteps
ActiveCell.Offset(n - 1,
ActiveCell.Offset(n - 1,
Next n
For n = NoOfTimeSteps + 1 To
ActiveCell.Offset(n - 1,
ActiveCell.Offset(n - 1,
Next n
End If
End Sub

FPTLogReader.dll

0) = DataArray(n - 1, 0)
1) = DataArray(n - 1, 1)
200
0) = ""
1) = ""

You might also like