DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Global Event Macros
-
gcrews October 28, 2010 at 7:02 pm
Global Event Macros
October 28, 2010 at 7:02 pmParticipants 5Replies 6Last Activity 12 years, 3 months agoWhen I put the following code in xmetal.mcr it does not get run when I change view. I suspect this is because there is already a macro in the topic_ditabase.mcr , Is there any way to make a global event macro that applies to all types and not have to edit every single mcr for each type?
test();
function test()
{
Application.Alert(“Hello World”);
}
]]>Another thing, Is there a way to get Xmetal to reload a document when you open the file and it is already open?
Derek Read October 28, 2010 at 8:29 pm
Reply to: Global Event Macros
October 28, 2010 at 8:29 pmI'll have to investigate the conflict you seem to be having, I think your suspicion is probably correct however.
You can reload a document using the Reload() method.
gcrews November 8, 2010 at 10:27 pm
Reply to: Global Event Macros
November 8, 2010 at 10:27 pmWhen I try to use ActiveDocument.Reload() on a DITA document, Xmetal pops up the dialog asking for a dtd.
Derek Read November 8, 2010 at 11:02 pm
Reply to: Global Event Macros
November 8, 2010 at 11:02 pmI'm not sure why this would occur for DITA documents but I suspect it is because we have some logic in the DITA functionality that does some fancy catalog lookups or it might be part of the redirection code we use when checking to see where a document should open (topic vs map with a decision to open maps in the Map Editor or Tags On / Normal view).
Why do you need to do a reload? Perhaps knowing that will let me figure out another means. Note that customizing the DITA functionality is not supported so there may not be any supported way to do what you want to do.
gcrews November 9, 2010 at 7:02 pm
Reply to: Global Event Macros
November 9, 2010 at 7:02 pmWith a fresh install of Xmetal 6.0.1.030 , on the reviewer sample document it still asks me for the DTD on ActiveDocument.Reload(); . I tried the macro in the application level macros and document type level, both locations cause the same issue.
ActiveDocument.Reload();
]]>gcrews November 17, 2010 at 3:01 pm
Reply to: Global Event Macros
November 17, 2010 at 3:01 pmcan anyone verify this? it sure would be nice to be able to reload the document though macros automatically on demand.
Derek Read November 17, 2010 at 5:05 pm
Reply to: Global Event Macros
November 17, 2010 at 5:05 pmYes, I have verified it (the issue occurs). I think what you're looking for is a quick fix. That I don't have.
If you can answer the question about why you need to do this I can communicate that to the development team and we might be able to figure something out. In addition, knowing that will allow us to build requirements into the DITA functionality that are currently missing.
-
AuthorPosts
- You must be logged in to reply to this topic.