Formatting toolbar interferes with script

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Formatting toolbar interferes with script

Nirit Avnimelech

Hi all,

I don’t know if anyone noticed it, but when I have a large output file (i.e., many CTables) in SPSS 15, when running mergeSignifTable.SBS, the script stops at a certain point, before the end of the file.  I noticed that when activating the pivot tables, the formatting toolbar “counts” itself, and the numbers on it get higher and higher (“Formatting Toolbar3”, “Formatting Toolbar4”, and so on).  When it gets to about 200, the script stops running.  If I try to run the script again, it will, of course, start from the beginning of the file, which doesn’t help me.  It seems to me that the formatting toolbar number is assigned not according to how many times you activated objects, but by the object number, since activating the same object several times always gives the same toolbar number.

Does anyone have a workaround?  Is there any way to “tell” the formatting toolbar that it is allowed to go higher?

Please don’t tell me to use SPSS 18 with the “merge=yes” option.  I tried it, and the results I get are (1) unreadable and (2) different than what I get otherwise…

If there is an equivalent script for SPSS 18 I’ll be glad to try it.  I’m not able to program by myself, but can read and understand scripts.

Thanks!

Nirit

Reply | Threaded
Open this post in threaded view
|

Re: Formatting toolbar interferes with script

Jon K Peck
I am not familiar with this script, but it sounds like it is activating tables and invoking the pivot table editor.  It should not be doing that.  There is a much more efficient Basic api, GetTableOleObject that should be used instead.  Tables are thereby not activated, but the editing apis are available.

If what you are doing is merging Ctables significance tables into the main table, there is an alternative way to do this with the SPSSINC MERGE TABLES extension command.  That requires at least V17, but apparently you have access to V18.  This can be simple to use with many table formats.  In other cases it can be a little tricky to specify the command correctly.  And for a few formats, it can't be done at all.  Many people have used this successfully.  MERGE TABLES requires the Python programmability plugin, which can be downloaded from SPSS Developer Central, www.spss.com/devcentral.  You can also get the extension command from there.  Although the command is implemented in Python, in most cases it is not necessary to know how to write Python code in order to use this.

HTH,

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        Nirit <[hidden email]>
To:        [hidden email]
Date:        11/24/2010 02:42 AM
Subject:        [SPSSX-L] Formatting toolbar interferes with script
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi all,
I don’t know if anyone noticed it, but when I have a large output file (i.e., many CTables) in SPSS 15, when running mergeSignifTable.SBS, the script stops at a certain point, before the end of the file.  I noticed that when activating the pivot tables, the formatting toolbar “counts” itself, and the numbers on it get higher and higher (“Formatting Toolbar3”, “Formatting Toolbar4”, and so on).  When it gets to about 200, the script stops running.  If I try to run the script again, it will, of course, start from the beginning of the file, which doesn’t help me.  It seems to me that the formatting toolbar number is assigned not according to how many times you activated objects, but by the object number, since activating the same object several times always gives the same toolbar number.
Does anyone have a workaround?  Is there any way to “tell” the formatting toolbar that it is allowed to go higher?
Please don’t tell me to use SPSS 18 with the “merge=yes” option.  I tried it, and the results I get are (1) unreadable and (2) different than what I get otherwise…
If there is an equivalent script for SPSS 18 I’ll be glad to try it.  I’m not able to program by myself, but can read and understand scripts.
Thanks!
Nirit