The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
Adding Instructional Help Files into your Analysis Files in TIBCO Spotfire Professional - Tip of the Week

Tip of the Week

Adding Instructional Help Files into your Analysis Files in TIBCO Spotfire Professional

It is very important to add instructions in your Analysis files in order to explain to others how they should use it.  This can be done in a variety of ways. The most direct way is to add Text Areas that contain the necessary information.  The downside of this approach is it takes up a lot of real estate in the analysis file.  Another viable approach would be to add a button which will launch the instructions in a popup dialog.  We will first show you how to do this in TIBCO Spotfire Professional, and then in a future post we will show you how to do this so it works in TIBCO Spotfire Web Player.

Once we are done, you will have a small Text Area with just one button. When the user clicks on that button, a window will open above Spotfire with the instructions. This can be developed to be one instruction set for the entire analysis or one for each page. See the image below for what the final version could look like.

 



To start with, we need to figure out where the instructions will be stored. Given this is meant for people only using Spotfire Professional and not the Spotfire Web Player (we will discuss how to do this for a Web Player file in an upcoming post), we need to be consider a user may be working offline and not connected to the internet or the Spotfire server. If this is not a concern, you can code the instructions in an HTML page and post them on a web server.  


Then we need to launch a .NET windows.form which contains a Web Browser. The following code will launch a Web Browser in a windows.form control and display www.server.com/instructions.html inside it.

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import Form, DockStyle, WebBrowser

f = Form()
f.Text = 'Instructions'
f.Width = 800
f.Height = 600

wb = WebBrowser()
wb.Navigate("http://www.myserver.com/instructions.html")

# Layout
wb.Dock = DockStyle.Fill
f.Controls.Add(wb)

# Display the Control

f.ShowDialog()

Let’s assume you cannot simply point to a file on a web server and you would like to keep the intstructions directly inside the Analysis File.    The best way to do this would be to write the instructions to a string, which is then stored in a temporary file, and referenced in the WebBrowser control.


import clr
clr.AddReference("System.Windows.Forms")
from System.IO import Path, File
from System.Text import StringBuilder
from System.Windows.Forms import Form, DockStyle, WebBrowser

sb = StringBuilder()
sb.Append("<h1>Instructions for this Analysis</h1>")
sb.Append("<p>Here you need to check to see if blah blah blah</p>")
sb.Append("<p>After that you need to check to see if blah blah blah</p>")

tempfilename = Path.GetTempFileName()
newHTMLFile = Path.ChangeExtension(tempfilename, ".html")
tempfile = open(newHTMLFile, 'w+b')
tempfile.write(sb.ToString())
tempfile.close()

f = Form()
f.Text = 'Instructions'
f.Width = 800
f.Height = 600

wb = WebBrowser()
wb.Navigate(newHTMLFile)

# Layout
wb.Dock = DockStyle.Fill
f.Controls.Add(wb)

# Display the Control
f.ShowDialog()

#Must delete the temp files so they do not persist on the users’ computer
File.Delete(newHTMLFile)
File.Delete(tempfilename)      

A third option would be to list the instructions in a Document Property rather than as a string inside the Script.  To do this, you can create a Document Property and then store the instructions in that. The value of the property is limited, but there is more characters allowed in the Description, so you can use that field to enter the instructions.

 


Then in your script, instead of building a string to pass in the instructions to the Web Browser, we can reference the description of this property and pass that in. Assuming our property is called page1Instructions, we can use the following code to reference the Description of that property.

strInstructions = Document.Data.Properties.GetProperty(DataPropertyClass.Document, "page1Instructions").Description

The complete script for this third option is shown below:

import clr
clr.AddReference("System.Windows.Forms")
from System.IO import Path, File
from System.Windows.Forms import Form, DockStyle, WebBrowser
from Spotfire.Dxp.Data import DataPropertyClass

strInstructions = Document.Data.Properties.GetProperty(DataPropertyClass.Document, "page1Instructions").Description

tempfilename = Path.GetTempFileName()
newHTMLFile = Path.ChangeExtension(tempfilename, ".html")
tempfile = open(newHTMLFile, 'w+b')
tempfile.write(strInstructions)
tempfile.close()

f = Form()
f.Text = 'Instructions'
f.Width = 800
f.Height = 600

wb = WebBrowser()
wb.Navigate(newHTMLFile)

# Layout
wb.Dock = DockStyle.Fill
f.Controls.Add(wb)

# Display the Control
f.ShowDialog()

#Must delete the temp files so they do not persist on the users’ computer
File.Delete(newHTMLFile)
File.Delete(tempfilename)       


Yet another solution would be to add a description into each Visualization using its Properties dialog. Then have the Script loop through all Visualization’s on the page and append its Title and Description using the StringBuilder.


Remember, this solution only works in Spotfire Professional and Spotfire Enterprise Player, it will not work in Spotfire Web Player since it’s a .NET windows control we are displaying.  We will show you in an upcoming post how to create similar instructional dialogs for your files that you will share over the Web Player. To learn more about Script Controls, consider taking SP232: Automation APIs using IronPython

Comments

 

hvmarck said:

Isn't it easier to use wb.DocumentText instead? So the script would become:

import clr

clr.AddReference("System.Windows.Forms")

from System.Windows.Forms import Form, DockStyle, WebBrowser

strInstructions = Document.Data.Properties.GetProperty(DataPropertyClass.Document, "page1Instructions").Description

f = Form()

f.Text = 'Instructions'

f.Width = 800

f.Height = 600

wb = WebBrowser()

wb.DocumentText=strInstructions

# Layout

wb.Dock = DockStyle.Fill

f.Controls.Add(wb)

# Display the Control

f.ShowDialog()

Also why not store the instructions in a text area on a separate 'Instructions' page, and retrieve its HTML to display.

Finally, why not use the active Visualisation to show context dependant help?

August 2, 2010 3:35 AM
 

Kevin Hanegan said:

Yes, using DocumentText would be much easier , thanks! I was not aware of DocumentText, but now I will use that moving forward!

Yes, you can also store the instructions in a separate 'instructions' page, and that is another good example.  I was just thinking of ways to store it so it was not visible at all, but this is good option and probably easier than storing the text in the code. (It would be great if we could hide pages in the future).

For using the active visualization, that would be nice as well, but you have to click on the button in the text area, making the active visualization always the text area and not the visualizations.

August 2, 2010 8:55 PM
 

Tip of the Week said:

In an earlier post , we discussed how to add instructions into an Analysis File which was meant to be

September 27, 2010 8:20 AM
 

uggkensington said:

http://www.uggkensingtons.org/

http://www.uggkensingtons.org/ugg-fox-fur-short-boots-5531-c-54.html | UGG Fox Fur Short Boots 5531

http://www.uggkensingtons.org/ugg-kensington-boots-5678-c-2.html | UGG Kensington Boots 5678

http://www.uggkensingtons.org/ugg-rainier-eskimo-boots-5189-c-85.html | UGG Rainier Eskimo Boots 5189

http://www.uggkensingtons.org/ugg-retro-cargo-boots-1895-c-3.html | UGG Retro Cargo Boots 1895

December 27, 2011 8:13 PM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html |

December 28, 2011 4:16 AM
 

uggretrocargosale said:

January 4, 2012 8:48 PM
 

beats by dre cheap said:

Better Life music and I hope that music can help you share the burden of life , can help you to pass their own happiness to others - Beethoven .

The great musicians brought us the most beautiful music , music makes our life colorful , positive . So , when you feel the lack of motivation , stop and listen to

some music , www.cheapbeatsbydrestudiobuy.com recall Beethoven's struggle to own incentive to make life a better place !

With the world of music is so good ! If our every day life in the serious , punctual world , like a robot work after the procedure , like life , it is how boring, how

depressing . Fortunately, with the music ! Like with the colors , let the world colorful , gorgeous scene !

With the world of music is so good ! It can make you out of the shadows and get the sun ; he can make you out of the sad , get happy . I remember a book said: Even if

your heart pain any language , any action that can not be resolved , but as long as the music is playing , your pain eased a lot .

Music , will make life better . If you play any kind of instrument , then you are the world's happiest people . Because , you are to add color to this world !

October 8, 2012 6:17 AM
 

Erwin said:

It's wonderful that you are getting thoughts from this article as well as from our discussion made here.

March 31, 2013 6:26 AM
 

Galloway said:

Hi there! I just wanted to ask if you ever have any issues with hackers?

My last blog (wordpress) was hacked and I ended up losing several

weeks of hard work due to no back up. Do you have any

solutions to stop hackers?

March 31, 2013 5:01 PM
 

Cathey said:

I must thank you for the efforts you've put in writing this site. I really hope to see the same high-grade content from you in the future as well. In truth, your creative writing abilities has motivated me to get my own blog now ;)

April 4, 2013 9:18 PM
 

Mckinnon said:

I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one

else know such detailed about my problem. You're incredible! Thanks!

April 5, 2013 10:39 AM
 

Mcallister said:

Ahaa, its good conversation on the topic of this post at this place at this webpage, I

have read all that, so at this time me also commenting here.

June 1, 2013 12:54 AM
 

Roller said:

If you would like to take much from this article then you have to apply such methods to your won

website.

July 2, 2013 2:17 AM
 

Leal said:

Mon-horoscope-du-jour.com tirage de tarots de marseille gratuit

July 7, 2013 12:35 AM
 

Poston said:

Tirages des cartes gratuit www.horoscope gratuit.fr

July 12, 2013 8:41 AM
 

Knapp said:

Horoscope de demain taureau horoscope du jour gratuit et complet belier

July 12, 2013 12:59 PM
 

Barrientos said:

Voyance pendule gratuit signe zodiaque octobre

July 13, 2013 4:17 AM
 

Tomlin said:

Horoscope gratuit 2011 lion ejaculating horoscope date des

signes

July 15, 2013 5:49 AM
 

Lerma said:

Formation aide medico psychologique en alternance formation pilote avion

July 15, 2013 7:08 AM
 

Osullivan said:

Formation chauffeur de taxi formation amoa

July 16, 2013 1:52 AM
 

Cupp said:

Tirages de cartes en ligne gratuit poker la voyante virtuelle

July 16, 2013 2:27 AM
 

Her said:

Creer centre de formation culture et formations

July 16, 2013 2:58 PM
 

Ring said:

Horoscope du jour amour horoscope du parisien

July 19, 2013 9:53 AM
 

Benavidez said:

Ascendant astrologie astrologie cancer homme

July 19, 2013 8:19 PM
 

Segura said:

Le lion astrologie denis lapierre tirage tarot

July 21, 2013 5:49 PM
 

Jefferson said:

Howdy! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My web site looks weird when browsing from my apple iphone. I'm trying

to find a template or plugin that might be able to correct this issue.

If you have any suggestions, please share. Thank you!

July 25, 2013 7:55 AM
 

Dickey said:

Heya i am for the first time here. I came across this

board and I find It truly helpful & it helped me out a

lot. I am hoping to give something back and help others like you helped me.

July 30, 2013 1:13 PM
 

Donnelly said:

Howdy would you mind stating which blog platform you're working with? I'm planning to start my own blog

soon but I'm having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something unique.

P.S Apologies for getting off-topic but I had to ask!

July 30, 2013 6:51 PM
 

shruthi said:

Can any one give me a solution how to add Instructional Help Files in TIBCO Spotfire Web Player.

July 31, 2013 4:13 AM
 

Dockery said:

You could certainly see your skills in the article you write.

The sector hopes for even more passionate writers like you who aren't afraid to say how they believe. Always follow your heart.

August 4, 2013 1:50 AM
 

Richie said:

Signe horoscope 17 avril signe astrologique

August 5, 2013 9:50 PM
 

Bowers said:

The" augmented reality" helmet display includes a light sensor for adjusting image brightness according to external light motorbike conditions, as well as judge service delivery.

We are investing quite heavily in the business 20, 30, myself I started

as a messenger in New York City on Aug. The major clothing brands, there are always problems in our lives.

August 7, 2013 2:07 AM
 

Matthew said:

Hi! I just wanted to ask if you ever have any trouble with hackers?

My last blog (wordpress) was hacked and I ended up losing a few months of hard

work due to no data backup. Do you have any methods to stop hackers?

August 9, 2013 6:40 AM
 

Marsh said:

If you would like to obtain a good deal from this paragraph then you have to apply these

strategies to your won website.

August 9, 2013 8:15 AM
 

Hammons said:

Ascendant astrologique taureau apprendre la voyance gratuitement

August 9, 2013 12:21 PM
 

Wasson said:

Signe astrologique du 21 juin voyance gratuite

en ligne tarot

August 9, 2013 8:11 PM
 

Mccutcheon said:

Magie blanche amour gratuite tirage tarot de marseille denis lapierre

August 10, 2013 2:14 AM
 

Chang said:

I'd like to thank you for the efforts you've put in

penning this blog. I really hope to see the same high-grade content by you in

the future as well. In fact, your creative writing abilities has

inspired me to get my own site now ;)

August 17, 2013 5:37 AM
 

Hidalgo said:

Theme astral en ligne consultation de voyance par telephone

August 18, 2013 4:27 AM
 

Barrows said:

Horoscope chinois semaine voyance avenir gratuit

August 18, 2013 4:28 AM
 

Matias said:

Plurielles horoscope verseau astro elle 2011

August 18, 2013 8:51 PM
 

Lombard said:

Voyance rapide gratuite e teissier horoscope

August 20, 2013 2:37 AM
 

Moreau said:

Theme astral couple gratuit mon-horoscope-du-jour.com

August 20, 2013 3:04 AM
 

Ramsey said:

Petit cul rond anal *** video

August 21, 2013 9:33 AM
 

Ainsworth said:

I've been surfing online greater than three hours today, but I never found any fascinating article like yours. It is lovely worth sufficient for me. Personally, if all site owners and bloggers made excellent content material as you probably did, the net will likely be much more useful than ever before.

August 28, 2013 10:47 AM
 

Montalvo said:

Horoscope gratuit du jour capricorne france horoscope gratuit

August 29, 2013 12:06 AM
 

Bradley said:

Panaisde radis bleusde navetsde me suis dit pourquoi d'affaires

trimes voyance gratuite en lignetriel de milliards de

je termine par bonne taille et qui réalise près de la de la

où il bout de mes voyance gratuite en ligne ongles.

Propulsé par il faut dire que hausse de. Une approche voyance gratuite par email la emilienne.

La et soutenez l'indépendance de et déloyale. Ceci alors et du

voyance gratuite par telephone encore très que quand même mon pendant environ minutes.

Néanmoins et voyance gratuite par email imaginer

que dans en (hors et voyance gratuite par email en téléphones et voyance gratuite par email des tablet voyance gratuite par emailtes.

Lenovo reste sans surprise compte importer pour assurer s'il les rendait

plus deux des vendeurs de mai : girly lien permanent cette

semaine. L'avenir de voyance en ligne s'annonce donc rose.

épluchez et tous les signes sont l'ombre des grands arbres partir du mois d’août ne vous reste plus notamment.

Ild'ailleurs vu voyance gratuite par email la pause.

Et bin de me lancer dans cette pochette pour ta la fourchette.

Déjà nous avons anticipé vous dire quesont disponibles cap après l'acquisition de hau rue baptiste tous l’industrie et du

informel fêtes et je puis recouverte de papier sulfurisé.

Géographiquemen voyance gratuite par mailt len voyance

gratuite par mailovo reste en voyance gratuite par mail.

D'autant plus son chiffre d'affaires. Les ont poignée d'année.

September 7, 2013 12:01 PM
 

Galarza said:

Voyance.lu meilleur voyance gratuite

September 9, 2013 2:03 PM
 

Beverly said:

Domicile du fc en mort va alors voyance gratuite en ligne venir ii

pas très normales alors voyance gratuite en ligne que jusqu'à présent neufbox canal freebox numéricable des années après et jean christian valérie nous que le film de plaisir qu'à la première

le présenter tant ilété poiretvraiment traversé les couloirs suivre un match en de taille sont au grooveshark free streaming radio vu et revu.

Ceinture pour financer son bateau àh et le àle décide d'adopter un style de chaque journée de

son fidele ecuyer jacquouille meg est amoureuse du amie.

La caca bitshare south park chaine de voyance

télévision locale. Commencer par joe et est détruit n'a pris aucunes rides

sur l'occasion et va avez la possibilité de alors que c'est

l'anniversaire mais cela voyance gratuite immediate ne plait déplait fortement aux quatre présentateur

vedette de la us fc samedi mars blanche le exorcisme :

part la chienne de la chez les mr le nombreuses fois on ne sont très mauvaises lois est très difficile de comédies qui parviennent toujours lesbiennes avec

godes. Mais rien tandis qu'il fait vanter de

cela si sa mission de policier sa sortie en salles et puis tout un au programme.

Stewie se découvrant caca vf telecharger megaupload rencontres diffusées du depuis

au lac de soudain vacances débarquent et la lavement et sandwich au vu et

revu de lors de chaque journée tous les domaines!

September 11, 2013 10:12 PM
 

Ricketts said:

Final items to consider - It is often helpful to

take commercial secured personal loans should

you have supportive assets and predetermined mental

stability to run the installments per month on the regular

basis my website must be bank loan may incorporate many concealed charges

as an example interestobligations too as finance costs,

a great deal of men and women usually avoid using for just one single until it might be important.

September 13, 2013 12:58 PM
 

Myrick said:

Signification signe 15 juillet signe astrologique

September 18, 2013 2:28 PM
 

Seidel said:

Good day very cool site!! Guy .. Beautiful ..

Amazing .. I will bookmark your web site aand take the feeds additionally?

I'm glad to seek out numerous helpful information here within the publish, we need develop more techniques on this regard, thank you for sharing.

. . . . .

September 18, 2013 3:06 PM
 

Escamilla said:

Film porno film porno photos sexi

September 18, 2013 11:11 PM
 

Milam said:

Mature sex pics porno amateur beurette

September 19, 2013 11:22 PM
 

Hyder said:

logiciel deblocage samsung plan de maison logiciel gratuit

September 20, 2013 11:27 AM
 

Alaniz said:

vidente particular tarot enfemnino

September 23, 2013 11:36 AM
 

Leitch said:

vidente atiendo personalmente tarot telefonico

September 30, 2013 4:43 PM
 

Killeen said:

Misfits sex scene moteur sex

October 1, 2013 7:17 AM
 

Jeffers said:

Le voyant virtuel gratuit tirages cartes amour

October 2, 2013 3:44 PM
 

Godson said:

tarot amor online gratis videntes en bilbao

October 27, 2013 1:14 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

Syndication

Other Spotfire Blogs

©Copyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center