Join Projects class Otco error
I'm using the OmniPlan trial (tried 1.5.0 / 1.5.1 rc1) and wanted to use the Join Projects script to merge a couple of my schedules.
I've tried joining small schedules (less than 10 tasks/subtasks each), and purely test schedules of 3-4 tasks each, but get the same error: [INDENT][B]The script 'Join Projects' could not complete. [/B] AppleScript reported the following error: OmniPlan got an error: Can't get <<class Otco>> of item 1 of every child task of project of document id "91DC1FFE-...".[/INDENT] Any ideas? I'm considering purchasing OmniPlan if this works out. Thanks a bunch. |
You can fix the script by opening it in Script Editor, and changing the two places where "<<class Otco>>" occurs to "completed".
However, this script was mostly created as a temporary workaround until 1.5 was released. Now you can accomplish essentially the same thing just by dragging tasks from one project to another. (In 1.1, that would only copy the tasks, but now it also brings their resource assignments.) |
it worked
Thanks this worked.
What I'd ideally want to do is automatically take a folder of individual schedules and combine them into one master schedule, then use filters to produce a schedule specific to each resource. Dragging and dropping is too much work for doing this whenever an individual schedule updates or for working with many schedules. Is there a way to easily change this script so that it loops through a whole folder, instead of joining a single file? Thanks! |
That should be fairly straightforward.
On line 400, change "choose file" to "choose folder" Then wrap everything from lines 405 to 472 in a repeat block something like [CODE]repeat with thisFile in items of sourceInfo whose kind is "OmniPlan"[/CODE] and then change all occurrences of [B]sourceInfo[/B] inside that block to [B]thisFile[/B] |
I tried this, but got an error on the new repeat line:
[INDENT]The variable sourceInfo is not defined.[/INDENT] |
Just in case it helps, here's what the lines in question look like after modification:
[CODE] if my onlyShowOmniPlanFilesInOpenDialog then set sourceAlias to choose file with prompt "Source project to import contents from:" of type {"com.omnigroup.omniplan.planfile"} without invisibles else set sourceAlias to choose folder with prompt "Source project to import contents from:" without invisibles end if repeat with thisFile in (items of sourceInfo whose kind is "OmniPlan") -- sneaky trick to prevent quirks that occur when two OmniPlan files have the same uuid. Generate a new file using the original as a template will force a new unique id. set thisFile to info for sourceAlias if kind of thisFile is "OmniPlan" then set t to POSIX path of sourceAlias set sourceDoc to make new document with properties {template:t} set sourceName to name of thisFile [/CODE] ... and I ended the repeat before the end tell on the last line of the script. Thanks for all the help. |
[CODE]set thisFile to info for sourceAlias[/CODE]
should be before the repeat and changed back to [CODE]set sourceInfo to info for sourceAlias[/CODE] |
I made the changes and got this error:
[INDENT][B]The script 'Join Projects' could not complete.[/B] AppleScript reported the following error: Can’t get {"micro schedules", date "Monday, April 7, 2008 12:36:27 PM", date "Monday, April 7, 2008 12:36:38 PM", 82593, true, false, false, true, false, missing value, "micro schedules", alias "Test Leopard Server Standard:System:Library:CoreServices:Finder.app:", "Folder", {0, 0, 0, 0}, "", ""} whose «class kind» of it = "OmniPlan".[/INDENT] |
1 Attachment(s)
This is what I get for not trying out a solution before telling it to you.
I'm having a bit of a fight with Finder's applescript interface trying to fix it the way I told you. So here's a simpler, yet slightly less convenient way. You'll have to select all the projects in the choose dialog, but it means it works. |
Thanks for the script. It did the trick. Great! Let's see what OmniPlan 2 comes up with...
|
All times are GMT -8. The time now is 09:07 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.