Skip to main content
1-Visitor
December 30, 2009
Question

J Link error messages

  • December 30, 2009
  • 1 reply
  • 643 views
Here's one for all you J Link gurus out there.

I'm using this routine (from Marc Mettes) to display error messages to the
user:





public void DisplayMessage ( String mesg ) throws Exception {

stringseq seq = stringseq.create();

seq.set(0, mesg);

session.UIDisplayMessage(msgFile, "JLOG %s", seq);

seq.clear();

writeLog(mesg);

}



The message this displays is a plain one.

How do I write a message with an error or other symbol, such as the yellow
triangular sign w/ the exclamation point?



--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>

    1 reply

    1-Visitor
    December 30, 2009


    > How do I write a message with an error or other symbol,
    > such as the yellow triangular sign w/ the exclamation point?

    Add the appropriate code (%CP, %CW, %CE, etc) to the first
    line of the (four line) message file entry you wish to change.

    Your line like this:
    JLOG %s

    would change to this (leave the space for readability):
    %CW JLOG %s


    Message file changes can be tedious to test because Pro/E only
    loads a message file once per session. To test changes, you
    have to restart Pro/E.



    Marc
    --
    Marc Mettes
    -
    Visit My CAD/PDM AutomationBlog
    Or, Subscribe to My CAD/PDM Automation Blog by Email