============================================== HowTo: Determine a Project Control File's Path ============================================== .. include:: ..\version.h .. include:: howto-reference.h .. contents:: Table of Contents :backlinks: top ------- Preface ------- This document discuss how to determine the Project Control File (PCF) path while working within a Compass Style script. Assumptions ----------- It is assumed that you are familiar with the following concepts, * What a Project Control File (PCF) is and what role it plays with the MineSightŪ data. * What is a Compass style script. * How to work with a Compass Style script. ------------------------ Determining the PCF Path ------------------------ Whenever you execute a Compass Style script you have all the modules available in the grail.compass package. At first glance, it may seem reasonable to use the :f:`cmpsys.getpcf()` function to retrieve the path to the Project Control File (PCF). However, this function will not return the *path* to the PCF, but rather it will return a :c:`Pcf` object instead. What we want is the path to the PCF file, and that is determine by examining the compass project file. To gain access to the compass project file, you would use the grail.compass.projectinfo_ module. The following lines of code illustrate accessing the PCF path using the projectinfo module, .. Python:: from grail.compass import projectinfo projectinfo = cmpsys.getprojectinfo() pcfname = projinfo.get(projectinfo.PCFPATH_TAG)