cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Custom Dir Variable

berard
1-Newbie

Custom Dir Variable

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 6
byork
17-Peridot
(To:berard)

APTCUSTOM in the variable.

Hi Keith--



I think get_custom_dir() is the function you want.



--Clay





Clay Helberg

Senior Consultant

TerraXML


byork
17-Peridot
(To:berard)

I agree with Clay if you are using acl get_custom_dir() is correct.
bibach
1-Newbie
(To:berard)

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 🙂


berard
1-Newbie
(To:berard)

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_PA...









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:

Top Tags