How do I install a custom toolbar in the Epic editor 5.4?
Hi Everyone,
I built a custom toolbar by editing the editwindow.xml file in Arbortext (C:\Program Files (x86)\PTC\Arbortext Editor\lib\dialogs) however, I understand that it is not the correct way to add a custom toolbar. I've read a great part of the customization guide and also the programmers guide, but I just cannot find the information I need, in the form of a code sample, that will help me do this all correctly.
I have removed the toolbar XML code from the editwindow.xml file and put it into a new file called "my-custom-toolbar.xml". I have also created a new file called "my-custom-toolbar.acl" that hopefully can be used to load the toolbar when a document is opened up in the Arbortext editor. Both of these files are in a following location on my PC:
C:\Program Files (x86)\PTC\Arbortext Editor\custom\editinit
I think I am close to succeeding because when I put a response("HELLO") message within the above ACL file, it showed up as expected. Unfortunately, my custom toolbar didn't show up, and worse, I don't know why.
Here is some information:
- The window_load_component_file(win, "my-custom-toolbar.xml") command returns 0 - I assume that return value means it failed as it does in C.
- I have two files, one ACL and one XML that are both in the above editinit directory.
- Below is the code found in the my-custom-toolbar.acl file that is suppose to load and display my custom toolbar in the Editor.
#BEGINNING OF CODE SAMPLE [Not part of the file]
function \
init(win = current_window())
{
if (window_state(win) < 0) {
response("Invalid window $win")
return
}
local doc = window_doc(win)
if (!doc_valid(doc)) {
response("Invalid document")
return
}
#===> Load my custom toolbar on Windows.
window_load_component_file(win, "my-custom-toolbar.xml")
return win
}
# Calls the above function
init()
#END OF CODE SAMPLE [Not part of the file]
Could someone please lend me a hand and have a look and please tell me where I went wrong? Thank you in advance for your help and input everyone.
- George

