Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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");
Solved! Go to Solution.
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 :
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");
Hi,
Please refer the below help center topic and few articles explaining about the same. Please get this implemented. Thanks
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
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:
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
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 :
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");