LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Set Graph Font.vi How do you Format Axis Numbers?

Solved!
Go to solution

Hi,


I need some help with formatting the AXIS on a Word Graph using Labview.  In my situation I have data reads like this:

0.0033

0.0003

0.0203

Etc...

I need FOUR decimal points to correctly display the numbers.


When I run it through Labview and into Word...All I get is ZEROES across my Axis.

Labview To Word

 

If I double click the AXIS (In Word) and go to the properties "Number" tab, and CHANGE it from "General" to "NUMBER", and set the "DECIMAL PLACES" to "4". 

The graph looks EXACTLY the way I want it to look:

Word's Settings 

 After Manual Settings Are Applied:

After Applying Word Settings 

After manually applying the Word settings The AXIS is formatted perfect!  I have the correct 4 decimals points for my data.

 

NOW, the Question...

How do I use the "Word Set Graph Font.vi" to format the Axis with four decimal points?

 

I have tried countless combination, and I can't seem to make it work.  I even called NI Tech support, and they kinda of "shrugged" their shoulders and referred me to a "help" file.

 

I maybe approaching this the wrong way, but my goal is to use a "Word Template", and "Generate a Word Doc Report" without having the user to format the Graph MANUALLY. 


Here is a sample of what I think should work...but I can't seem to find a working combination.

Draft

 

Looking for any suggestions!  Let me know what you think and I'll give it a try!

 

Many Thanks!


Doug

0 Kudos
Message 1 of 4
(3,380 Views)
Solution
Accepted by topic author Dhubbell

I figured it out!

 

The "Word Set Graph Font.vi" help file isn't too helpful.  But I found the combination that works!

 

Solved Graph

 

Here is the example code that worked:

Correct Graph Code


What's tricky about the "help" file:

"number format (general)".  To me I thought it was referring to Word's Categories..I.E....General, Number, Currency...etc.

"number format (general)" really means is "Number Format Mask".  I replaced this with the type of Mask I wanted "0.0000"

 

"axis type (category)" again, another confusing title.  The Word Properties Names "General, Number, Currency...etc." as a "Category".

I tried all the combinations (3) using a "constant"...but using these caused the problem!  I REMOVED the input for the vi!

 

"graph index (-1)"  again the Help file is lacking explanation.  But it does give a little hint.

This references the order of Graphical Objects in your Word doc.  In my template I had the following:

0 = Graphic Header

1 = Histogram one.

2 = Histogram two.

I changed the Graph Index to 2.

 

I have literally been working on this problem for days!  No sooner I post my problems, I figured it out.

 

Doug 

0 Kudos
Message 2 of 4
(3,370 Views)

hi can you give me the vi?

cause i've some problem that's i cant give name to x-y axis

tanx

0 Kudos
Message 3 of 4
(3,167 Views)

Sorry, the image links were broken.  I relinked them again.  Take a look now...this should explain it better.

 

Doug

0 Kudos
Message 4 of 4
(3,137 Views)