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

Is there any way to send a real time message to Windchill users via the Windchill interface?

SOLVED
Highlighted
Newbie

Is there any way to send a real time message to Windchill users via the Windchill interface?

From time to time I have an urgent need to communicate to my Windchill users. For example if I need to bring the system down for some sort of emergency reason. I would like to find a way that I can send some sort of broadcast message to the users directly through Windchill. Any ideas would be greatly appreciated.

Thank you,

Barry

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Hi Barry,

I have a more elegant and yet simple way to do this. Please try below and let us know if it works:

  1. 1.       Update <Windchill_Home>\codebase\netmarkets\jsp\util\begin_custom.jspf to include following

<%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>

  1. Following goes to <WT_HOME>\codebase\netmarkets\jsp\util\banner.txt

<div class="bannerdiv">

Kindly, Create user & context with your own name and test your issue within it. Unnecessarily do not mess Site/Org setting.<br>

Use <a href="http://abc.xyz" target="_blank">Knowledge base</a> for your queries.

</div>

  1. 3.       Add the following to the  Windchill\codebase\netmarkets\themes\windchill\xtheme-windchill.css

   .bannerdiv {

color: red; position: absolute; top: 2px; z-index: 1000; left: 200px; font-size: 14px ; font-weight:bold;

background: white;

width: 45%;

}


Thanks,

Shirish

View solution in original post

12 REPLIES 12
Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Search PTC's knowledge base for: banner.txt

For my test servers I do put the following in <WindChill>/codebase/netmarkets/jsp/util/banner.txt :

<div style="position: absolute; background-color: white; top: 3px;

z-index:1000; left: 170px;border:1px solid

#000;color:#f00;padding:2px;font-weight:bold;font-size: 16px;">

<!-- Banner begins here -->

Windchill 10.2 M020 test server

<!-- Banner ends here -->

</div>

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

We have a message that is displayed in our header, that is controlled in the begin_custom.jspf file. By default it will only show a new message on restart of your system, which will not meet your needs.

What we did to address this is put some javascript into the begin_custom.jspf to read a file from the server each time the page was called. We can now change the contents of the text file that is read in and a new message will appear.

We included these two imports in the begin_custom.jspf file

<%@page import="java.io.FileReader"%>

<%@page import="java.io.BufferedReader"%>

We also added some style which i'm omitting

then where we want the message to appear we had the following code

<div class="boxStyle" >
<!-- Banner begins here -->
<%
BufferedReader reader2 = new BufferedReader(new FileReader(application.getRealPath("/") + "netmarkets/jsp/util/FILENAME.txt"));
StringBuilder sb2 = new StringBuilder();
String line2;

while((line2 = reader2.readLine())!= null){
sb2.append(line2+"\n");
}
out.println(sb2.toString());
%>
<!-- Banner ends here -->
</div>

In the text file put whatever text/html you want to display. Change as necessary and watch the message update the next time the page is reloaded. You could probably get fancier and add some AJAX if you wanted the message to update on the page without the user refreshing the page, but that wasn't what we needed.

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Hi Barry,

We also use the alter banner like Randy. In addition to modifying the banner.txt you'll need to add the following line to the codebase/netmarkets/jsp/util/begin_custom.jspf:

<%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>

Restart Windchill and you'll have the banner. It will update in real time, with no need for a restart. If you want to take it down, clear the contents of banner.txt and leave it blank. It will disappear. We leave ours blank until we have messages to send to our users.

For more information check out the customizers guide.

-Adam

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

I think that don't good idea for WC perfomance to read a file online for every request.

May be need add some cache?

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Hi Barry,

There have been a lot of good ideas mentioned here, but the recommended way is to use the header to send mass messages.

Here is an article that covers it.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS77184

Good Luck,

Jarrett

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

Hi Barry,

I have a more elegant and yet simple way to do this. Please try below and let us know if it works:

  1. 1.       Update <Windchill_Home>\codebase\netmarkets\jsp\util\begin_custom.jspf to include following

<%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>

  1. Following goes to <WT_HOME>\codebase\netmarkets\jsp\util\banner.txt

<div class="bannerdiv">

Kindly, Create user & context with your own name and test your issue within it. Unnecessarily do not mess Site/Org setting.<br>

Use <a href="http://abc.xyz" target="_blank">Knowledge base</a> for your queries.

</div>

  1. 3.       Add the following to the  Windchill\codebase\netmarkets\themes\windchill\xtheme-windchill.css

   .bannerdiv {

color: red; position: absolute; top: 2px; z-index: 1000; left: 200px; font-size: 14px ; font-weight:bold;

background: white;

width: 45%;

}


Thanks,

Shirish

View solution in original post

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

I have a question.

I'm looking at the default banner_custom.jspf file.  All the lines except for the first one has a %> at the beginning.  Is that to indicate it's commented out?

Highlighted

Re: Is there any way to send a real time message to Windchill users via the Windchill interface?

No, "%>" it does not mean that the line is commented out. Basically this is jsp directive. You can Google it for additional information.

Announcements