Thanks for the suggestion Geert whilst it will create the packages it won't address the issue of the diagram objects referencing the packages instead of the classes. I'd actually thought of that approach but realised its limitation for my particular problem. After sleeping on it I think I'll try to attack the problem at the database level with some SQL like the following [yet to be fully tested]. I've just got to find something that will run the SQL on the eap file aka Access 97. Unfortunately I don't have Access 97 but 2010 which won't run queries unless I upgrade the file to Access 2010 format but if I do that then Sparx EA won't read it. Maybe I'll try transferring the eap model to another repository like feap or SQL Server and find a SQL developer type tool to run it on. Just sharing some thoughts on my way forward.
For now here is that Access SQL I mentioned earlier:
/*Convert objects to packages*/
UPDATE t_object
SET t_object.Object_Type = "Package"
WHERE (((t_object.[Object_Type])="Class"));
/*Insert packages into t_packages*/
INSERT INTO t_package
(Name,
Parent_ID,
CreatedDate,
ModifiedDate,
Notes,
ea_guid)
SELECT
t_object.Name,
t_object.ParentID,
t_object.CreatedDate,
t_object.ModifiedDate,
t_object.Object_ID,
t_object.ea_guid
FROM t_object
WHERE t_object.Object_ID>7; /*First 7 elements were already packages so exclude them*/
/*Map old t_object parent IDs to new ones in t_package using notes field in t_package*/
UPDATE t_package AS T1, t_package AS T2 SET T1.Parent_ID = [T2].[Package_ID]
WHERE (T1.Parent_ID)= IIF (IsNumeric ([T2].[Notes]), CInt([T2].[Notes]),0);
PS: Ignore that SQL as I found it didn't work. See later post for TSQL version that does work.