qwert

Seeking guidance on pie chart example

10 posts in this topic

#1 ·  Posted

Two and a half years ago, a chart function was posted, which included an excellent example:

I've downloaded and attempted to run the scripts, but I'm getting numerous messages of undeclared variables ...  $__Au3Obj_X64, for example.  But when I attempt to remedy one condition, another occurs.

Before I continue, I have these questions:

Is the Au3 Object UDF out of date so that it can't run on Win7 with 3.3.14.2?  There's a long thread about it that ends with a "no longer lives" comment.

If it's not obsolete, where should the UDF be placed with respect to the example script ... and how should the DLL be referenced?  (I suspect that something is related to me running AutoIt 32-bit on a 64-bit Win7 PC.)

Lastly, is there a better approach to obtaining simple pie charts with Au3?  I have a set of a dozen values that match very well to what the above example was displaying.

Thanks in advance for any advice.

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

If you run Excel you could use my ExcelChart UDF.
For download please check my signature.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

Unfortunately, in this instance, I'm working on an interactive process where the Au3 script will generate the table of values based on user inputs.

But I'll review your UDF for possible other cases.

Thanks for responding. 

 

 

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

That's no problem. You could simply add the values from your script to Excel and then generate the Chart.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

Yes, I realize that.  But requiring Excel as a middleman application is a "non-starter" for an average home user.  For example, I don't have Excel on my PCs, and I'm probably ahead of most.

Hopefully, someone can weigh in with answers to my questions.  Surely, the ideas behind the Au3 Object UDF haven't been abandoned.

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

Delving further into the issues, a key factor seems to center on the following call parameter in _AutoItObject_Startup():

Parameters ....: $fLoadDLL -- [optional] specifies whether an external DLL-file should be used (default: False)

Why is this necessary?  Where should the two DLLs be located?  And what DLL is used if the parameter is False?

Moreover, can someone paraphrase why running a compiled 32-bit script should ever concern itself with "64-bitness".

Share this post


Link to post
Share on other sites

#7 ·  Posted

AutoItObject UDF is only depending on one file: AutoItObject.au3. This file contains the DLLs directly in the source code (lines 1000 - 1050). It's working fine on Windows 7 and on your PC. Mine is exactly the same. If you have downloaded Charts.au3 and the example you can save AutoItObject.au3 in the same folder. Run the example and you should see a nice pie chart. I did without changing anything at all.

AutoItObject.au3 is a lot of code just to store 20 properties of the pie chart. You might as well use an array. If you want to access the properties through the names you can use a dictionary object or a DllStruct with dot notation.

Share this post


Link to post
Share on other sites

Thanks for your response.  It's good to hear that the combination is valid.  But with the AutoItObject.au3 (only) on the same directory as the GUI script, I still receive the following error ...  whether compiled or run from SciTE:

"D:\Au3 LAB\Charts\AutoItObject.au3" (692) : ==> Variable used without being declared.:
If $__Au3Obj_X64 Then
If ^ ERROR

I'll back track and see if I can isolate the cause.  But I do still wonder how "64-bitness" is getting into the mix when I'm running everything as 32-bit mode (albeit on a 64-bit Win7 Pro).

Share this post


Link to post
Share on other sites

AutoItObject.au3 is included in Charts.au3, so it should be saved in the same folder as Charts.au3.

The If-statement is checking if you are running 32 or 64 bit to be able to load a 32 or 64 bit version of the DLL-file.

Share this post


Link to post
Share on other sites

#10 ·  Posted

Quote

it should be saved in the same folder as Charts.au3

That was the nudge that I needed.  I was delving into too many details.

When I started my prototype script, I had embedded Chart.au3 (for simplicity's sake?) ... which caused the includes to occur after the _AutoItObject_Startup() call in the chart function.

Now everything I've seen makes sense.  Thanks for sticking with me, on this (... but sorry it turned out to be such a basic error on my part).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now