Hi Martin--
You can switch PCF files, out, but the way you do it is a bit indirect.
To make this work, you need to define a function that loads the PCF file
you want to use and returns the ACL doc ID for that PCF document, then
attach that function as a profiledochook, something like this:
function load_profile(doc = current_doc()) {
# doc_open flags: readonly, no warnings/errors, no stylesheet, don't
prompt for doctype
local FLAGS = 0x001 | 0x020 | 0x200 | 0x400;
# check for PCF file in doc directory
local docdir = doc_dir(doc);
local pcfs[];
glob(docdir . $main::PCS . "*.pcf", pcfs);
if (count(pcfs)>0) {
# found one, so let's use it
local pcfdoc = doc_open(pcfs[1], FLAGS);
return pcfdoc;
}
else {
# no special file found, so just load default doctype PCF
return 0;
}
}
# add hook function
add_hook("profiledochook","prof_config::profile_doc_loader");
--Clay
Clay Helberg
Senior Consultant
TerraXML