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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Arbortext not recognizing custom/init for acl files

DL_10914713
12-Amethyst

Arbortext not recognizing custom/init for acl files

Hi all,

 

Im trying to change the menu of Arbortext. I am able to see changes in the instance.acl with my dtd files, but can't get the menu to change upon startup (no file loaded).

 

My acl is located in custom/init

 

 

 

function load_menu(){

menu_add -before .File.#15 "Publish PDF and Release Print License" -cmd {
	compose_pdf();
	license_release("PrintPublishing");} 
}

add_hook("menuloadhook", "load_menu");

 

 

 

 

I also have an environment variable APTCUSTOM created with a pointer to a mapped drive containing the same code.

 

I also tried the simple_init.js to see if it was an issue with acl, but same result (nothing).

 

 

 

Application.alert("Hello from JavaScript");

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Summary: You can use APTCUSTOM, but the location of the file must match the path structure of the custom folder in the Arbortext install. Then APTCUSTOM should point to the new custom folder. The menu changes should be made in an .acl file located in the init folder within custom. It also seems that if you use APTCUSTOM it wont bother looking in the default custom folder in the install path. 

 

So instructions -  Thanks @Alexia :

 

  1. Go to Arbortext install directory and copy the "custom" folder. Here it is for me. 

    C:\Program Files\ Arbortext Editor 8.2

  2. Create your custom directory and place that custom folder in it. Here is mine:

    J:\Documentation\Customization\custom

  3. Create an environment variable called APTCUSTOM, then point to this directory.

    APTCUSTOM              J:\Documentation\Customization\custom

  4. Put the menuchange acl file into the init folder. Then restart Arbortext.

    J:\Documentation\Customization\custom\init\ [your file]

 

File: 

 

function load_menu(){

menu_add -before .File.#15 "Publish PDF and Release Print License" -cmd {
	compose_pdf();
	license_release("PrintPublishing");} 
}

add_hook("menuloadhook", "load_menu");​

 

View solution in original post

5 REPLIES 5

Hi,

Please refer the below help center topic and few articles explaining about the same. Please get this implemented. Thanks

Modifying the Default Menus

https://www.ptc.com/en/support/article/CS169346

https://www.ptc.com/en/support/article/CS401786

https://www.ptc.com/en/support/article/CS227476

Regards,
Manpreet Singh

Hi @DL_10914713,

 

I wanted to follow up with you on your post to see if your question has been answered. 
If so, please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so that we can continue to help you. 

 

Thanks,
Anurag
 

Alexia
14-Alexandrite
(To:DL_10914713)

Hello 

Firstly I tested with a file called init.acl  which I placed in the [InstallPath]custom\init folder - this way I could check it was working without having to set an environment variable :

response("I am from init.acl")
function load_menu(){

menu_add -before .File.#15 "Publish PDF and Release Print License" -cmd {
	compose_pdf();
	license_release("PrintPublishing");} 
}

add_hook("menuloadhook", "load_menu");

Once I was sure it was working as expected from the main Editor install folder, I then copied the whole of the custom folder to a different drive. I then renamed the init.acl from the install folder so it would not be used.

In my environment variables I pointed to the custom folder

APTCUSTOM =  C:\Cases\Core\custom\

When opening Arbortext Editor I received the 'response' and also the menu item:

 

2024-06-25_11-10-38.png

I would always recommend testing step by step - this way you will know the exact point where the file is not working - this will then explain if it is the code, the path or the environment. 

Also please check that you do not have firewalls stopping you accessing the custom folder

Please let me know how you get on.

But from my testing with your code and sample - it should all be ok 👍

Alexia

Alexia
DL_10914713
12-Amethyst
(To:Alexia)

Ok interesting.
Here is what I tested.

 

Case 1

created file init.acl into the [install path]/custom/init folder, containing code above. 

renamed aptcustom environment variable so its not used

code works

 

Case 2

created same init.acl file into desktop

renamed custom folder (in install path) to see if it would pick up aptcustom

pointed aptcustom variable to desktop

code does not work 

 

Case 3

created same init.acl file into desktop/custom/init

pointed aptcustom variable to desktop/custom

renamed custom folder (in install path)

code works

 

Case 4

created same init.acl file into desktop/custom/init

pointed aptcustom variable to desktop/custom

kept custom folder (install path) the same - removed init.acl file from init folder.

code works

 

Case 5

created same init.acl file into desktop/custom/init, then renamed init folder.

pointed aptcustom variable to desktop/custom

kept custom folder (install path) the same - removed init.acl file from init folder.

code doesnt work

 

So it seems that the key thing for Arbortext to pick up the customized acl file is to store the file into a directory that matches the custom directory in the Arbortext install path, then have APTCUSTOM point to that folder. 

Summary: You can use APTCUSTOM, but the location of the file must match the path structure of the custom folder in the Arbortext install. Then APTCUSTOM should point to the new custom folder. The menu changes should be made in an .acl file located in the init folder within custom. It also seems that if you use APTCUSTOM it wont bother looking in the default custom folder in the install path. 

 

So instructions -  Thanks @Alexia :

 

  1. Go to Arbortext install directory and copy the "custom" folder. Here it is for me. 

    C:\Program Files\ Arbortext Editor 8.2

  2. Create your custom directory and place that custom folder in it. Here is mine:

    J:\Documentation\Customization\custom

  3. Create an environment variable called APTCUSTOM, then point to this directory.

    APTCUSTOM              J:\Documentation\Customization\custom

  4. Put the menuchange acl file into the init folder. Then restart Arbortext.

    J:\Documentation\Customization\custom\init\ [your file]

 

File: 

 

function load_menu(){

menu_add -before .File.#15 "Publish PDF and Release Print License" -cmd {
	compose_pdf();
	license_release("PrintPublishing");} 
}

add_hook("menuloadhook", "load_menu");​

 

Announcements

Top Tags