DaveSomick

How to detect if MSP has loaded a Clarity project?

Discussion created by DaveSomick on Mar 12, 2012
Latest reply on Mar 22, 2012 by Chris_Hackett
We are exporting several custom fields from a project to MSP. In a recent release we have changed how we reference External dependencies and so have added a new 3 value lookup field to the task, that replaces a checkbox . We are exporting this new field to MSP.
The old field mapped to a MSP flag field. The new field is now a text field in MSP.
Because the old field is saved back to Clarity when you save the project, we have to delete the old field via a macro and create the new one so it will populate from Clarity. This macro is working fine when a project is exported from Clarity. but what is happening is if you open an older clarity project, from your local drive, that does not have that field in it, MSP is throwing an error 1104 on this code
TableEdit Name:="&Entry", TaskTable:=True, NewName:="", FieldName:="", NewFieldName:="Text24", Title:="", Width:=10, Align:=2, ShowInMenu:=True, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, ColumnPosition:=8, AlignTitle:=1
which is the macro that MSP generates.

My question is basically this. Is there a way to know in an MSP macro that the project opened is a Clarity project? Does any of the Clarity code set a variable that I can reference and not run the macro if the project is not a Clarity project?

We are using MSP 2003 and 2007.

thanks

Outcomes