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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Refresh of Entities/Catalog/Tag Templates

GregoryMackenzi
12-Amethyst

Refresh of Entities/Catalog/Tag Templates

Hi,

This is an Epic 4.3 Editor Guru Meditation question:

I use the tag templates quite a bit and I am in the habit of editing
them, and their filenames manually with a text editor. Since they are
limited to 8.3 format names I have to get creative to work out
recognizable names and occasionally re-order them. The problem is that
if the editor is open, it will not re-fresh the tag template list even
if you open and close tag templates from the Tools menu. Adding a new
tag from within Epic is not a problem. What I'd like to know is if there
is a command line function that allows you to refresh/reload the
templates from scratch. So far, the only thing I've been able to do is
close my editor session and re-open it to refresh the tag template list.


This sort of re-load functionality would also be useful to re-load my
document's catalog and list of graphic entities since I'm also in the
habit of editing those manually. I'm wondering if there are any other
re-load functions besides the View>Reload Graphic on the menu.

Thoughts?

Greg
🙂

Gregory B. MacKenzie, B.F.A.
Programmer II
L-3 Communications Electronic Systems
249 Aerotech Park Drive
Box 960 Enfield Postal Station
Enfield Nova Scotia, Canada, B2T 1K9
9 REPLIES 9

Hi Greg-



Poking around in the Editor ACL code, I found a function that I think
should do what you want. Try this from the command line:


Hi Clay,



Good try! I got the following error:



Too many arguments to tagtmpls::collect_all_tagtmpls(): 2 passed, 0
expected.



I do have an ACL v 1.0 reference document here somewhere around here
from Arbortext. I took a look in the help files for tagtmpls but it only
lists "tagtmpl"



Greg

J


Hi Greg-



Ah, I should have looked more closely at the details of your original
post. I overlooked where you said you were using Epic 4.3. I'm using
5.3, and the function I found there does take 2 parameters. Sorry about
the confusion.



I don't have a copy of 4.3 available to check, but if you take a look at
the file where that function is defined, you can probably get a feel for
how to call it to do what you want. In 5.3, it's defined in
$ARBORTEXT/Editor/packages/tools/tagtmpls.acl, so it's probably in a
similar location in 4.3.



The first thing to try is just to take the error message at its word and
try calling it with no parameters. But if it's already loaded the list,
without the "force" parameter it might just decide it doesn't need to
reload them.



If there's no "force" parameter on the function call, you might need to
do some tweaking of your own to force it to reload, either by resetting

Hi Clay,



Thanks for the information, and no problem re: the version. 😉 A little
more jiggery-pokery seems to be required on my part with every little
thing I get into. I've been experimenting with 5.x on and off. I do have
the ACL designer document and the 5.x ACL command reference. I'll take a
look at the 4.3 installation and see what is in there. I've not really
had the opportunity to tinker with ACL. It would be worth learning I'm
sure.



Greg

J


Hi Greg-



If you are setting up an Arbortext application, it's definitely worth
getting familiar with ACL. Take a look at the file I mentioned. If
you've done any programming before, it won't be hard for you to
understand what's happening there.



--Clay




Hi Clay,



You are right on the mark! I checked the "tagtmpls.acl" file, which is
in "C:\Program Files\Epic\packages\tools". The first function is
"function collect_all_tagtmpls()". I took this to mean that it was not
very different from what you expected to see in 5.x.



I was in the Editor, I closed the tag templates window and I popped into
the templates directory, and made a new file. So, Returning to the
Editor I entered the following on the command line "tagtmpls::Init()"
pressed enter, and followed it quite simply with
"tagtmpls::collect_all_tagtmpls()" and then re-opened Tools>Tag
Templates. The list was updated!



Good news, this is great! Thank you!



Greg

J


Excellent, glad to see it's working for you.



Now, if you want, you can make a convenience function to make life a
little easier. You can make a file called reload_tagtemplates.acl in
your custom/init directory, and put the following code into it:



require tagtmpls;



function reload_tagtemplates() {

tagtmpls::Init();

tagtmpls::collect_all_tagtmpls();

}



This way it's just one operation instead of two, you just call
reload_tagtemplates() and you're done.



And if you're *really* lazy, you can map it to a key using the map
command. For example, to make control-t do this operation, add the
following line to the end of your script file above:



map control-t reload_tagtemplates();



Then all you have to do is make your changes, get back into Editor and
press control-t, and it will reload your templates.



As you can see, a little ACL can make life a lot easier for you (as an
application developer) and for your users. I think you'll find that time
spent learning some ACL will be time well spent.



--Clay


Hi,



That is very nice! I'll do exactly that, since I am terribly lazy...



Greg

J


Hi Clay,



Wow, that is really neat. Well thank you very much for your help. I
created the acl file as you suggested and it works very nicely via the
cntrl-t. That is very handy. I'll definitely have to learn how to use
ACL.



Thanks a lot,



Greg

J


Announcements

Top Tags