Jump to content
Software FX Community


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About PSaul

  • Rank
  1. Hello, I'm trying to make some Radial Gauges in PowerGadgets that pull data from a SQL database. I'm using the PowerGadgets Creator create PGF files that connect to SQL and for 1 value it's simple enough. Works fine. But I am attempting to do something more complex: I would like to create a gauge that shows our Quarterly Sales, with the Quarterly Sales Goal as the max value, with an InnerGuage with the Monthly Sales and Monthly Sales Goal as max. It's a sort of two part question: 1) I would like to pull in not just the mainvalue from the SQL query (the needle) but also the mainscale_max (the maximum value for the dial). Right now the Gauge just uses the first returned value from SQL. How do I make it use the 2nd returned value for the mainscale_max value? 2) Once I get that going, or even I have to forgo that and manually adjust the max value every quarter in the PGF file: How do I set up an InnerGauge that pulls from SQL? (when ever I add an innergauge it's just a static dial) I have been looking at the documentation and QuickStartGuide. I managed to do something very close to what I want using PowerShell, I combined 2 examples and came up with this: get-wmiobject Win32_PageFileUsage | select CurrentUsage,AllocatedBaseSize,PeakUsage | out-gauge -MainValue {$_.CurrentUsage} -MainScale_Max {$_.AllocatedBaseSize} -refresh 0:0:1 -InnerGauges_Add Radial -InnerGauges_0_RadialGauge_Value {$_.PeakUsage} -InnerGauges_0_Layout_Alignment BottomCenter -InnerGauges_0_Size 0.8 It queries WMI, returns 3 values, uses the 1st for the main needle, the 2nd for the main dial's max value and the 3rd for the innergauge. (I assume I could probably return a 4th and do the innergauge's max from that). Then I used the Ctrl+C and Ctrl+V trick from: and made a PGF file that works like the above PowerShell command. How can I make that work using straight SQL? Looking in the PGF file (which is XML) I see this in the Window section at the end: <Data>PowerGadgets.Commands.PowershellSource</Data> <Data.PrevCommands>get-wmiobject Win32_PageFileUsage | select Name,CurrentUsage,AllocatedBaseSize,PeakUsage</Data.PrevCommands> <Data.CurrentLocation>FileSystem::C:\</Data.CurrentLocation> <Data.SnapIns>PowerGadgets</Data.SnapIns> <Data.PropertyCount>3</Data.PropertyCount> <Data.Property0>mainvalue</Data.Property0> <Data.Property0ScriptBlock>$_.CurrentUsage</Data.Property0ScriptBlock> <Data.Property1>mainscale_max</Data.Property1> <Data.Property1ScriptBlock>$_.AllocatedBaseSize</Data.Property1ScriptBlock> <Data.Property2>innergauges_0_radialgauge_value</Data.Property2> <Data.Property2ScriptBlock>$_.PeakUsage</Data.Property2ScriptBlock> Is there a reference for the PGF/XML properties? If I could use Data.Property0SQL or something to assign to the various mainvalue, mainscale_max, innergauge, etc properties then it would work just fine. I suppose I could construct a PowerShell script that generates the query, but it would really just be a single invoke-sql command, so it seems pointless cumbersome. Seems like it can be done or should be doable, has anyone done something like this? Does anyone have a reference for the various Data.Property values for SQL in the PGF file? Any help appreciated! --Saul
  2. Yes, even if it was just one element it would be super handy. Do you know when this next version might be released? What I am wondering really is: Is it worth re-coding all of my PGF charts as PowerShell out-charts? Or if the next version which could export a PGF file to a bitmap is just around the corner then it's not worth my time. (unless there is a simple way to convert) Thanks, --Saul
  3. Yes, please let me know. I think it could be something others would be interested in too. Both being able to pass PGF files to the cmdlets and/or being able to output a PGF file to bitmap. The features are there, they just need to be connected! Or a simple way to convert between PGF and a list of cmdlet options. --Saul
  4. That sounds like it would work, but it doesn't. I tried: PS> out-chart -template "Today's Time Sheet.pgf" -output c:\test.png And it just outputs a random line chart, with 3 lines. I tried without the -output and it displayed the same chart. I tried moving the PFG to My Documents (the guide sort if implies that's where they're kept) but it didn't help. It's like it's showing an example chart. In fact, when I do just: out-chart -output c:\test.png it displays a random bar chart. And if I misspell the PGF file name I get the same random bar chart. So I know it's reading the PGF file but it's not actually using it to display anything. (the chart is a stacked bar-chart) I tried with a gauge PGF and it said "WARNING: The specified file is not a gauge template" Any other ideas? Could this be added in a future (soon?) release? I think it would be very useful, esp. since the functionality is already there for the PowerShell cmdlets. And it would be handy to be able to quickly group a bunch of gadgets together to make a dashboard. Or add a -display or -input switch to the out-chart and out-gauge cmdlets to let us specify a prebuilt PGF file. Either would work, which ever is simpler. Or do you think there is something I need to change/edit in my PGF file to allow it to work as a template? --Saul
  5. Hello, I've been trying out PowerGadgets, and my company recently purchased 7 licences. Or primary use for it is to visually display data from our help-desk software, which runs SQL. I have created several PowerGadget PFG files with the Creator. However I'd like to create a "dashboard" with several of the gadgets arranged so that I can easily bring them all up or minimize them, without having to deal with 10 different charts/gauges. And idea suggested was to output the Gauges/Charts to bitmap/PNG format and build a webpage that displays the pictures. I could then get the page to auto-refresh every 5 minutes or so, and have a script that re-exports the Charts to bitmaps so the page will update. (I could even set it so that clicking on one of the pictures would launch the correct chart "live"). My issue: I can't see how to make PGF files export out to PNG files. I know I can do it with the PowerShell out-chart cmdlet and the -output switch, but I tried: PowerGadgets.Presenter.exe "c:\temp\My Custom Chart.pgf" -output c:\test.png It just displayed the Chart (or sometimes it just displayed some random line chart for some reason). Is there a way to export the output of a PGF to a bitmap, like a PNG file? Or, is there a way I can pass a PGF file (which is just an XML) to the out-chart cmdlet and then use the -output switch? I would really rather not have to work out how to redo all my Gadgets as PowerShell out-chart and out-gauge commands. I spent a fair bit of time getting them looking just the way I want them. And since all the data comes from SQL anyway there is no real need. Any one able to offer some command line switches that will do what I want? Or could SoftwareFX be willing to add the -output switch to the PowerGadgets.Presenter.exe executable? Thanks so much, --Saul
  • Create New...