Table of Contents
This document discuss how to determine the Project Control File (PCF) path while working within a Compass Style script.
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.
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 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 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,
from grail.compass import projectinfo
projectinfo = cmpsys.getprojectinfo()
pcfname = projinfo.get(projectinfo.PCFPATH_TAG)