Skip to main content
1-Visitor
February 29, 2012
Question

Custom Dir Variable

  • February 29, 2012
  • 6 replies
  • 1445 views
After changing our deploy to use a server-side custom.zip (auto patch
deployment), we realized that there is one place in our code that looks for
a stylesheet in the custom dir. This was previously hardcoded to
"c:\program files\..." which of course no longer works.

Does anyone know offhand if there's a variable to find the path of the
current custom dir? I'm hoping to have it point to:

C:\Users\[USERNAME]\AppData\Local\PTC\Arbortext\Editor\.aptcache\zc\1\custom\stylesheets
or equivalent, so I'm thinking something like $CUSTOM_PATH + "\stylesheets"
would do the trick.

keith

    6 replies

    17-Peridot
    February 29, 2012
    APTCUSTOM in the variable.
    18-Opal
    February 29, 2012
    Hi Keith--



    I think get_custom_dir() is the function you want.



    --Clay





    Clay Helberg

    Senior Consultant

    TerraXML


    17-Peridot
    February 29, 2012
    I agree with Clay if you are using acl get_custom_dir() is correct.
    1-Visitor
    February 29, 2012
    Bear in mind that it is possible to have multiple custom directories
    set at once. I've used this to maintain a separate custom directory
    for code specific to a particular version of Arbortext (I have 5.3,
    5.4 and 6.0 all installed side-by-side, for various projects) in one
    custom directory and version-independent code in another, or for
    project-specific code in one directory and project-independent code in
    another.

    Given this, perhaps your best bet is to locate the stylesheet
    directory relative to the location of the document type for the
    current document (e.g., doc_type_dir() . '..\..\stylesheets').

    -Brandon 🙂


    berard1-VisitorAuthor
    1-Visitor
    February 29, 2012
    Yeah, I think that might be a better solution. get_custom_dir() returns:
    C:\Program Files (x86)\PTC\Arbortext Editor\custom\

    The other did the trick: (java)
    Acl.eval("doc_type_dir()") + "\..\..\stylesheets\renderlogic13.xsl"

    Thanks!

    On Wed, Feb 29, 2012 at 2:16 PM, Brandon Ibach <
    brandon.ibach@single-sourcing.com> wrote:

    > Bear in mind that it is possible to have multiple custom directories
    > set at once. I've used this to maintain a separate custom directory
    > for code specific to a particular version of Arbortext (I have 5.3,
    > 5.4 and 6.0 all installed side-by-side, for various projects) in one
    > custom directory and version-independent code in another, or for
    > project-specific code in one directory and project-independent code in
    > another.
    >
    > Given this, perhaps your best bet is to locate the stylesheet
    > directory relative to the location of the document type for the
    > current document (e.g., doc_type_dir() . '..\..\stylesheets').
    >
    > -Brandon Smiley Happy
    >
    >
    > On Wed, Feb 29, 2012 at 1:58 PM, Clay Helberg <chelberg@terraxml.com>
    > wrote:
    > > Hi Keith--
    > >
    > >
    > >
    > > I think get_custom_dir() is the function you want.
    > >
    > >
    > >
    > > --Clay
    > >
    > >
    > >
    > >
    > >
    > > Clay Helberg
    > >
    > > Senior Consultant
    > >
    > > TerraXML
    > >
    > >
    > >
    > > From: Keith Berard [
    > >
    > >
    > >
    > > Does anyone know offhand if there's a variable to find the path of the
    > > current custom dir? I'm hoping to have it point to:
    > >
    > >
    > >
    > >
    > C:\Users\[USERNAME]\AppData\Local\PTC\Arbortext\Editor\.aptcache\zc\1\custom\stylesheets
    > > or equivalent, so I'm thinking something like $CUSTOM_PATH +
    > "\stylesheets"
    > > would do the trick.
    > >
    > >
    > >
    > > keith
    > >
    > >
    > >
    >
    18-Opal
    February 29, 2012
    Hi Keith--



    In that case, I think you may have something misconfigured.
    get_custom_dir() should give you the location of the cached expanded zip
    folder when using zipped customizations. From the online help:



    In cases where APTCUSTOM cites a zipped custom directory, application,
    or CMS adapter, get_custom_directory returns a full path to the locally
    expanded form of the zipped customization. The expanded form is stored
    in the Arbortext Editor cache (.aptcache\zc) directory. For example, if
    APTCUSTOM is set to the following value: