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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

why can't I alias fileprint compose_pdf() from ./editinit/alias_fileprint.acl?


why can't I alias fileprint compose_pdf() from ./editinit/alias_fileprint.acl?

The application opens fine, but when I select File > Print... or click the
print icon on the toolbar ribbon, the following error displays:

[A18115] Error in initialization file:
[A11378] Can't redefine alias "FilePrint" since it is currently executing.

And, actually, it WORKS ok if you don't mind clicking OK on the error

What am I forgetting?

I've also attempted to menu_change File.Print, menu_delete File.Print and
menu_add File.Print but I can't do those without errors when the
application loads. (It then works, but I think it throws another error the
first time I use it. Then it's fine after that.)

I don't think it is a menu label issue like the $DeleteMarkupLabel issue we
discussed a while back. But maybe I'm not looking in the right place ...


Oh, and Happy New Year everyone! It's going to be a good one, I just know

Paul Nagai

Hi Paul--

Does your custom printing function load some other document(s) as part of its processing (or maybe reload the current doc for some reason)? If so, when it loads the document(s), that may be triggering the editinit code where you are trying to redefine the alias (which is already running, as the error message pointed out).

In that case, you may be able to work around this by tweaking the doc_open() flags to prevent it from loading editinit scripts.

Does the alias need to change in response to specific documents? If not, you might have fewer problems if you move the alias definition to init.acl, or to a doctype.acl file.


Thanks, Clay.

I dropped it into an instance.acl and the aliasing of FilePrint to
compose_pdf() now works without error. The defaul menu selection File >
Print... and the Print icon on the toolbar both load the desired "Publish
to PDF File" dialog.

compose_pdf() is not "my" print function, it's the Arbortext function
behind the Arbortext alias ComposePDFFile.

I think it does reload the document although I've never been sure why. I do
not think it should, but I think it does. I have had conversations w/PTC
support about it that didn't go anywhere as it was not the main focus of
its own call or anything. Our documents are small enough that it is a very
minor annoyance and has never squeaked loudly enough to get full attention.

Cookie: (Which you may have already seen on other channels 😉
Check out the podcast Welcome to Night Vale. It is classic radio drama
meets Twilight Zone. Or something like that. Episodes are 20 minutes (well,
the first one is, anyhow). The tagline is: Where every conspiracy theory is

Top Tags