|
|
|
date: Tue, 22 Jul 2008 13:37:03 -0700,
group: microsoft.public.project.developer
back
RE: Read Project Server 2007 Lookup tables values in C# COM Add-in prj
The lookup tables and picklists are available via the application object of
Project Pro from the COM-Addin. Below is a small example in C#
public void GetPickList(object Field)
{
Microsoft.Office.Interop.MSProject.Project MyProj;
int x;
try {
if (myproj.Application.CustomFieldValueListGetItem(Field,
MSProject.PjValueListItem.pjValueListValue, 1) != "") {
try {
x = 1;
DoEvents();
while (!ErrTrap) {
if
(myproj.Application.CustomFieldValueListGetItem(Field,
MSProject.PjValueListItem.pjValueListValue, x) != null) {
debug.print(myproj.Application.CustomFieldValueListGetItem(Field,
MSProject.PjValueListItem.pjValueListValue, x));
debug.print(myproj.Application.CustomFieldValueListGetItem(Field,
MSProject.PjValueListItem.pjValueListDescription, x));
x = x + 1;
}
}
}
catch {
}
}
}
catch {
return;
}
}
Hope this Helps
--
Ray McCoppin
http://www.randsmanagement.com
SRS gantt charts
Global Documenter for Project Server 2007
"Mani" wrote:
> I am using Project Server 2007 and Project professional. I created one
> Lookup table Field with Some values. I created a Text Field based on the
> Lookup
> table. The Text Field will be appear in each task(Task Level Text Custom
> Field). If I open the Project Professional I get the lookup table values in
> the Text
> Field.
>
> I created a COM Add-in using C#, in which it have to read all the Lookup
> table values. How I can read all the Lookup table values in the COM Add -in
> Project?
>
>
> Please anybody help me.
>
>
date: Wed, 23 Jul 2008 05:50:00 -0700
author: Ray McCoppin
RE: Read Project Server 2007 Lookup tables values in C# COM Add-in
Thanks very much for your valuable code.
I have a doubt.. I need to get the ValueList of the Lookup Table "HEALTH".
How i have to typecast and call your function.
will you please help me...
"Ray McCoppin" wrote:
> The lookup tables and picklists are available via the application object of
> Project Pro from the COM-Addin. Below is a small example in C#
>
> public void GetPickList(object Field)
> {
> Microsoft.Office.Interop.MSProject.Project MyProj;
> int x;
> try {
> if (myproj.Application.CustomFieldValueListGetItem(Field,
> MSProject.PjValueListItem.pjValueListValue, 1) != "") {
> try {
> x = 1;
> DoEvents();
> while (!ErrTrap) {
> if
> (myproj.Application.CustomFieldValueListGetItem(Field,
> MSProject.PjValueListItem.pjValueListValue, x) != null) {
>
>
> debug.print(myproj.Application.CustomFieldValueListGetItem(Field,
> MSProject.PjValueListItem.pjValueListValue, x));
>
> debug.print(myproj.Application.CustomFieldValueListGetItem(Field,
> MSProject.PjValueListItem.pjValueListDescription, x));
> x = x + 1;
> }
> }
> }
> catch {
>
> }
> }
> }
> catch {
> return;
> }
> }
>
> Hope this Helps
>
> --
> Ray McCoppin
>
> http://www.randsmanagement.com
> SRS gantt charts
> Global Documenter for Project Server 2007
>
>
> "Mani" wrote:
>
> > I am using Project Server 2007 and Project professional. I created one
> > Lookup table Field with Some values. I created a Text Field based on the
> > Lookup
> > table. The Text Field will be appear in each task(Task Level Text Custom
> > Field). If I open the Project Professional I get the lookup table values in
> > the Text
> > Field.
> >
> > I created a COM Add-in using C#, in which it have to read all the Lookup
> > table values. How I can read all the Lookup table values in the COM Add -in
> > Project?
> >
> >
> > Please anybody help me.
> >
> >
date: Wed, 23 Jul 2008 07:30:23 -0700
author: Mani
|
|