HowTo: Use Multiple PCF Files in One Script

Version: 16.2

Table of Contents

Preface

This document discuss how you can read the contents of more than one Project Control File (PCF) within one script.

In the older MineSight® Procedures you where limited to only being able to access one PCF file per procedure. Specifically, you where limited to only reading the contents of the one PCF that you working on within the given project.

That limitation has been removed with the use of the grail.data.pcf data access module.

Assumptions

It is assumed that you are familiar with what a PCF file is, and what role it plays with the MineSight® data.

Using More Than One Project Control File (PCF)

Reading from two or more PCFs simply requires instantiating two or more Pcf objects. Each object is related to the file it was instantiated with, and provides access to the internal data held within it.

As example, consider opening three PCF file and printing out the dimensions for each of the projects.

pcf1 = pcf.Pcf("p1f10.dat")
pcf2 = pcf.Pcf("p2f10.dat")
pcf3 = pcf.Pcf("p3f10.dat")

print "p1f10.dat: [1-%d, 1-%d, 1-%d]" % (pcf1.dx(), pcf1.dy(), pcf1.dz())
print "p2f10.dat: [1-%d, 1-%d, 1-%d]" % (pcf2.dx(), pcf2.dy(), pcf2.dz())
print "p3f10.dat: [1-%d, 1-%d, 1-%d]" % (pcf3.dx(), pcf3.dy(), pcf3.dz())

Within a Compass Style Script

Within a Compass Style Script you can gain access to the currently active Pcf object by using the grail.compass.cmpsys getpcf function. This simply returns the Project Control File (PCF) that the user selected via their project file. If you want to gain access to another PCF, you can do so by simply instantiating another Pcf object as discussed above.