DITA and XMetaL Discussion

  • gcrews

    Global Event Macros

    Participants 5
    Replies 6
    Last Activity 11 years, 11 months ago

    When 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?

    Reply

    Derek Read

    Reply to: Global Event Macros

    I'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.

    Reply

    gcrews

    Reply to: Global Event Macros

    When I try to use ActiveDocument.Reload() on a DITA document,  Xmetal pops up the dialog asking for a dtd. 

    Reply

    Derek Read

    Reply to: Global Event Macros

    I'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.

    Reply

    gcrews

    Reply to: Global Event Macros

    With 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();
    ]]>

    Reply

    gcrews

    Reply to: Global Event Macros

    can anyone verify this? it sure would be nice to be able to reload the document though macros automatically on demand.

    Reply

    Derek Read

    Reply to: Global Event Macros

    Yes, 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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support