Quantcast
Channel: Project Customization and Programming forum
Viewing all 4809 articles
Browse latest View live

How to read the resources calendar exceptions with VBA

$
0
0

Hello,

How can I read the resources Calendar.Exceptions and their subject label ?

Thanks for your help


Gérard Ducouret [Project MVP], Certifié Project 70632, Certifié ITIL


Add local users to ProjectTeam using JSOM

$
0
0

Hi All,

I've written below code to add local users to the Project Team using JSOM, It has no syntax errors. But I cant see the changes in the project. 

function ReadProjectResource()
{
     projectContext = PS.ProjectContext.get_current();
     Allprojects = projectContext.get_projects();
     draftproject=Allprojects.getById(projectID).get_draft();
     ProjectResources = draftproject.get_projectResources();
     projectContext.load(ProjectResources);
     projectContext.executeQueryAsync(UpdateResource,errorHandler);
}
function UpdateResource()
{
    debugger;
    try{
       // for(i=0;i<resources.length;i++){
             var newResource = PS.ProjectResourceCreationInformation
             newResource.set_id=createGuid();
             newResource.set_name=resources[1];
             draftproject.get_projectResources().add(newResource);
            draftproject.update();
       // }
        debugger;
        var queueJob = draftproject.publish(true);
        projectContext.waitForQueueAsync(queueJob, 60,function (response) {
            if (response !== 4) {
               
            }
        });
    }

I'm I missing anything here? Any help would be greatly appreciated.

Thanks in Advance.

Tactical Querying from Project Online with OData & Power BI

$
0
0

When querying tasks from Project Online in Power BI, typically the first two lines are these:

Source = OData.Feed(#"PWA Site URL" & "/_api/ProjectData/[en-us]",null, [Timeout=#duration(0, 0, 5, 0)]),
    Tasks_table = Source{[Name="Tasks",Signature="table"]}[Data]

The shortfall with that is that it calls every task from every project, and that gets messy in terms of time when there are dozens of projects in the site.

Is it possible to fine tune this initial query such that fewer projects and/or fewer fields are called in at the onset?

Thanks for your help!


JFitch

C1083 fatal Error

$
0
0

I have added header files included in project and also path for that header files also included in project properties but still it is giving c1083 error

Resource Availability and VBA

$
0
0

Hello,

How can we read and then write the Resource Availability in theResource Information dialog box, period by period?

Thanks for your help.


Gérard Ducouret [Project MVP], Certifié Project 70632, Certifié ITIL

"Move end of completed parts..." Java/PSI script

$
0
0

Hi all.

In my script I update "% complete" from Lotus to MS Project shedules on MSP Server.
In MS Project App, in "enterprise global template" this setting (move end of ... and other) is switch on.

But tasks updates without "move end of..." after script is complete.
I don't use resources, all task have "Fixed unit tasks".

I want, when I updated "% complete" on task with "Finish date" in Past, this task move on Status Date with correctly set "% complete" - see example.


What was a problem? Where I wrong?
This setting set in enterprise global template, calculation running on server...

custom field formula

$
0
0

I everyone.

How can i connect start and finish with a personalized duration?

If i need to make a personalized start and finish which is the formula to connect all of them?

At last how can i bring the personalized start and finish on the gantt chard (calendar)?

Creating a save system for text files?

$
0
0
    Hello, I've been working with Visual Studio for about three weeks now and figured it was time to create my first program. I deiced to do it in Windows Form. I would like my program to open up a form that acts like a notepad, and when the user was completed with the note, could save into a list that would appear on a separate form to be viewed or edited later. My Problem is that i don't quite know where to start with constructing a list text files that can be opened when you click on there label in the list. would someone please help me out with finding where to start with a program like this? My Goal in creating this program to help with keeping track of notes when studying.

How to obtain Duhamel's integral using C/C++

$
0
0

You can  translate into C++ this lazazrus script

program paramtrapint;
 uses    Crt, Graph ,SysUtils ;

type
  //double=real;
  func = function(  x: double ): double;
   Signalarray=record
        Uinp : func;
             tbegin : double;
             tend: double;
     end;


  funcparamdint  =  function  ( tau: double ; t : double; eps  : double  ; const  Uin  : func  ; const h : func  ) : double;




 function  Derivative ( t : double; eps : double ; const   uinp : func     )   : double ;
begin
    Result:=  ( uinp(t+eps) -  uinp(t ) )/eps;

end;



function   deriveU  ( tau : double; eps1 : double ; const  Uin   :   func     )  : double;

begin
 Result:= Derivative (tau, 1e-8,    Uin     );
end;



function  f_tointegr( tau: double ; t : double; eps  : double  ;  const Uin  : func   ; const  h : func   ) : double;
 const
   eps1=1e-8;
begin
 Result:= deriveU(tau ,eps,  Uin    )*h(t-tau);
end;








 function trapparam (  a, b,t, eps, eps2: double;  const  intfunc: funcparamdint  ;  const uinp : func   ;  const h  : func   ): double;
var
  h1,s,s0,s1,sn ,fun1,fun2,fun3  : double;
  i,n: integer;
begin

s:=1;
sn:=101;
n:=4;
   fun1:=intfunc(a,t ,eps2  ,  uinp  ,  h     );
   fun2:=intfunc(b,t ,eps2  ,  uinp  ,  h    );
s0:=(fun1+fun2)/2;

s1:=intfunc ( ((a+b)/2),t ,eps2   ,   uinp  ,  h    );
while (Abs(s-sn)>eps) do
begin
 sn:=s;
 h1:=(b-a)/n;

    i:=0 ;
    while  i<(n/2)   do
    begin
       fun3:= intfunc( ( a+(2*i+1)*h1 ) , t  ,eps2 ,  uinp  , h   ) ;
    s1:=s1+fun3;
    i:=i+1;
    end;
 s:=h1*(s0+s1);
n:=n*2;
 end ;
Result:= s;
end;
     { **************************************** }









      function h ( t :double) : double;
  var
    R,C,k,Tau : double;
 begin

   R:=1000;
   C:=0.15e-6;
   k:=1;   //0.25
   Tau:=R*C;
   if t<0 then Result:=0 else
    Result:=  k*( Exp(-t/Tau))   ;

 end;

       function h2( t :double) : double;
  var
    R,C,k,Tau : double;
 begin

   R:=1000;
   C:=0.15e-6;
   k:=1;   //0.25
   Tau:=R*C;
   if t<0 then Result:=0 else
    Result:=  k*(1-Exp(-t/Tau))   ;

 end;

    function Uinp1( t: double ) : double ;
   begin

      Result:=1 ;  //t 0...0.1 s
   end;

     function Uinp2( t: double ) : double ;
   begin

      Result:=0;   // 0.1 s...3 s
   end;


       function Uinp3( t: double ) : double ;
   begin

      Result:=-1; // 3s..3.2 s
   end;

     function Uinp4( t: double ) : double ;
   begin

      Result:=0;   // 3.2s..6 s
   end;

   function AssignSignal(const   Ui  : func; tbeg :double; tend: double ): Signalarray;
   var
     Uinput :Signalarray ;
   begin

              Uinput.Uinp:=Ui;
              Uinput.tbegin:=tbeg;
              Uinput.tend:=tend;

      Result:=Uinput;
   end;



  function getht( const h: func ; t : double)  : double;
begin
       Result:=h(t);
end;

 function GetSignal(t: double  ):double;
 var
   Signal1: array of Signalarray ;
   m:integer;
 begin
      SetLength(Signal1,4);   //0,1,2- >U1,U2,U3
           m:=0;
           Signal1[0]:=AssignSignal(  @Uinp1  ,0, 1e-3  ) ;   //[0,t1]
           Signal1[1]:=AssignSignal(  @Uinp2  ,1e-3,2e-3   ) ;   //[t1,t2]
           Signal1[2]:=AssignSignal(  @Uinp3  ,2e-3,3e-3    ) ;   //[t2,t3]
           Signal1[3]:=AssignSignal(  @Uinp4  ,3e-3,4e-3   ) ;   //[t3,t4]
            if(t>=0   ) and   (t<= Signal1[0].tend) then m:=0;
               if(t>=  Signal1[1].tbegin) and   (t<= Signal1[1].tend) then m:=1;
               if(t>=  Signal1[2].tbegin) and   (t<= Signal1[2].tend) then m:=2;
               if(t>=    Signal1[3].tbegin) and   (t<= Signal1[3].tend) then m:=3;

             Result:=  Signal1[m].Uinp(t);

 end;

 function DuhamelInt(   t: double ;  eps , eps2 : double  ;   const h:func ): double;



var
   dUinp_Ht  :  double;
   y: double;
   te  ,tp : double;
   Signal: array of Signalarray ;
   n,m ,i : integer;


begin
              //U(t):=U(0)*h(t)+  integr(0;t;derivU(tau)*h(t-tau); dtau)
//U(t):=U(0)*h(t)+  integr(0;t;derivU(tau)*h(t-tau); dtau)
 {
    u


    t=[0 ,t1]
   Y1(t) =U1(0)*h(t)+  integr(0;t;derivU(tau)*h(t-tau); dtau)  //0..t1
     Отклик на остальных интервалах вычисляется по формулам, вытекающих из принципа суперпозиции:
   Y2(t)=U1(0)*h(t)+integr(0;t1;derivU1(tau)*h(t-tau); dtau)+
   +(U2(t1)-U1(t1))*(h(t-t1))  +integr(t1; t ; derivU2(tau)*h(t-tau); dtau)+

   Y3= U1(0)*h(t)  +  integr(0;t1;derivU1(tau)*h(t-tau); dtau) +
      +(U2(t1)-U1(t1))*(h(t-t1)) +integr(t1; t2 ; derivU2(tau)*h(t-tau); dtau)+
      +(U3(t2)-U2(t2))*(h(t-t2)) +integr(t2; t  ; derivU3(tau)*h(t-tau); dtau)

}
        //for dummy  example , if U(t):=U(0)*h(t)+  integr(0;t;derivU(tau)*h(t-tau); dtau)

           n:=4;
           //n:=4

           SetLength(Signal,n);   //0,1,2- >U1,U2,U3

           Signal[0]:=AssignSignal(  @Uinp1  ,0, 1e-3  ) ;   //[0,t1]
           Signal[1]:=AssignSignal(  @Uinp2  ,1e-3,2e-3   ) ;   //[t1,t2]
           Signal[2]:=AssignSignal(  @Uinp3  ,2e-3,3e-3    ) ;   //[t2,t3]
           Signal[3]:=AssignSignal(  @Uinp4  ,3e-3,4e-3   ) ;   //[t3,t4]





          m:=0;
        // if(t>=0   ) and   (t<= Signal[0].tend) then m:=0;
       //  if(t>= Signal[1].tbegin) and   (t<= Signal[1].tend) then m:=1;
        // if(t>= Signal[2].tbegin) and   (t<= Signal[2].tend) then m:=2;
        // if(t>= Signal[3].tbegin) and   (t<= Signal[3].tend) then m:=3;
               if(t>=0   ) and   (t<= Signal[0].tend) then m:=0;
               if(t>=  Signal[1].tbegin) and   (t<= Signal[1].tend) then m:=1;
               if(t>=  Signal[2].tbegin) and   (t<= Signal[2].tend) then m:=2;
               if(t>=    Signal[3].tbegin) and   (t<= Signal[3].tend) then m:=3;
               if  (t> Signal[3].tend)  then  begin writeln('end of signal'); Result:=0; exit; end;




               y:=0;
           for i:=0 to m do
            begin


               if (i=0) then
                 begin



                y :=y+Signal[0].Uinp(0)*getht(h,t)  +trapparam(0,t,t,eps,eps2, @f_tointegr,Signal[0].Uinp,  h    );      //U1
                 end

                  else
                    begin
                          tp:=Signal[i].tbegin  ;  //t1,t2 ;
                          te:=Signal[i].tend  ;    //t2,t3 ;
                          if (i=m)  then   te:=t;
                           dUinp_ht:=( Signal[i].Uinp(tp)-Signal[i-1].Uinp (tp) )*getht(h,t-tp);   //U2(t1)-U1(t1) ; U3(t2)-U2(t2) ;   U4(t3)-U3(t3)
                           y :=y+dUinp_ht+trapparam(tp,te, t,eps,eps2, @f_tointegr, Signal[i].Uinp , h  ); //U2,U3,U4
                     end;
            end;
                      Result:=y;
              // for Uinp=U0*1(t)   U(t)=U0 *(1-exp(-t/tau))

          // Result:=dUinp_Ht+trapparam(0,t, t,eps,eps2, @f_tointegr  ,  Uinp    ,  h   );


end;












procedure  main  ;
 var
      fp : TextFile;
      time,Tend,step,s: double;
begin

//writeln (' s(t)= trap(0,t,eps,f);   f(tau)=p(tau)*h(t-tau) ');
writeln ('  Input Tend, ms (6) ');
readln( Tend);
 Tend:=Tend*0.001 ;
writeln (' Input step ,ms,(0.1) ');
readln( step);

  step:=step*0.001;

     assignfile(fp, 'Integral.txt');
      ReWrite(fp);


writeln (fp,'  Tbeg=0 , Tend=', Tend);
writeln (fp,'   step=',step,'s ' );
//writeln (fp,'   p(tau)=-20000*exp(-200*tau); ');
//writeln (fp,'   h(t)=0.005-0.0025*exp(-100*t);  ');

  time:=0 ;

while    (time<=Tend) do
begin

s:=DuhamelInt(time, 1e-6,1e-8,   @h   );




writeln(' t= ',time,' s u(t)=  '  ,s) ;
writeln (fp,' t=',time, 's u(t)=  ' ,s);
time:=time+step  ;
end;
  CloseFile( fp);
readln;

end;








       {





  function trap (  a, b, eps: double; const intfunc: func  ): Double;
var
  h1,s,s0,s1,sn   : double;
  i,n: integer;
begin

s:=1;
sn:=101;
n:=4;

s0:=(intfunc(a )+intfunc(b ))/2;

s1:=intfunc ( ((a+b)/2)  );
while (Abs(s-sn)>eps) do
begin
 sn:=s;
 h1:=(b-a)/n;

    i:=0 ;
    while  i<(n/2)   do
    begin

    s1:=s1+intfunc( a+(2*i+1)*h1 ) ;  ;
    i:=i+1;
    end;
 s:=h1*(s0+s1);
n:=n*2;
 end ;
Result:= s;
end;









 function xsquare( x: double   ): double ;
begin

Result:=x*x ;
end;

 procedure GetIntegral;
 const
  eps=1e-8;
 var y: real;
 begin
    y:= trap(1,5, eps,@xsquare);
    writeln('y=',y);
    readln;
 end;


       }








            Function fgraph(x:real): real;
begin
Result:= DuhamelInt(x, 1e-6,1e-8,   @h   );
//fgraph:=100*sin(x) //сюда вписывать функцию графика
end;

  
            Function fgraph1(x:real): real;
begin
Result:= DuhamelInt(x, 1e-6,1e-8,   @h2   );
//fgraph:=100*sin(x) //сюда вписывать функцию графика
end;
              Function fgraph2(x:real): real;
begin
Result:=GetSignal(x  ) ;
//fgraph:=100*sin(x) //сюда вписывать функцию графика
end;
  procedure Postroenie;  // строит график функции
var
x1,x2:real;    // границы изменения аргумента функции
y1,y2:real;    // границы изменения значения функции
x:real;        // аргумент функции
y:real;        // значение функции в точке x
step:real;     // приращение аргумента
l,b:integer;   // левый нижний угол области вывода графика
w,h:integer;   // ширина и высота области вывода графика
mx,my:real;    // масштаб по осям X и Y
x0,y0:integer; // точка - начало координат
n :integer;
str: string ;
gd,gm :smallint;
ymax ,ymin : real ;
begin
// область вывода графика
l:=100;
b:=600;
h:=300;          // высота
w:=1024;         // ширина

x1:=0;     // нижняя граница диапазона аргумента
x2:=0.0035;    // верхняя граница диапазона аргумента
step:=1e-8;  // шаг аргумента



 // вычислим масштаб
my:=100; // h/1e-12+abs(y2-y1);  // масштаб по оси Y
mx:=2*h/abs(x2-x1);  // масштаб по оси X

// оси
  x0:=l;
  y0:=b;

  Writeln('Initialising Graphics   .');
   gm:=0;
   gd:=0;

   initgraph(gd,gm,'');

// оси

  line(l,b+h,l ,b-h);
  line(l,b,l+w,b);






outtextXY(l+5,b-h,'Y');
outtextXY(l+w-10,b+10 ,'t');

// построение графика
x:=x1;
setcolor(12);
n:=0;
    ymax:=0;
    ymin:=0;
while ( x<x2) do
 begin

 y:=fgraph(x);

           if  ymax  < y   then  ymax:=y;
           if  ymin > y      then  ymin:=y;
      PutPixel ((l+ Round(x*mx )) , (b- Round(y*my))   ,11)  ;
   y:=fgraph1(x);

           if  ymax  < y   then  ymax:=y;
           if  ymin > y      then  ymin:=y;

            PutPixel ((l+ Round(x*mx )) , (b- Round(y*my))   ,12)  ;
   y:=fgraph2(x);

           if  ymax  < y   then  ymax:=y;
           if  ymin > y      then  ymin:=y;
      PutPixel ((l+ Round(x*mx )) , (b- Round(y*my))   ,10)  ;



   // putpixel( x0+ Round(x*mx),b-Round(y*my),0);
       if (n=50000) then
        begin
            str:=FloatToStr (Round(x*100000)/100000)  ;
          outtextXY((l+ Round(x*mx )),b+50, str);
             str:=FloatToStr (Round(ymax*100000)/100000)  ;
            outtextXY (l-70,(b- Round(ymax*my)), str);
            str:=FloatToStr (Round(ymin*100000)/100000)  ;
            outtextXY (l-70,(b- Round(ymin*my)), str);
          n:=0;
          end;
 n:=n+1;

 x:=x + step;
end;

      readln;
     CloseGraph;
     Writeln('Graphics was Closed.');
end;






















begin
  writeln('trap  test');
 // GetIntegral;
  writeln('trapparam test');
 // main;

  readln;

   Postroenie;

end.

https://social.microsoft.com/Forums/ru-RU/ff11db4b-aa20-42ea-80bc-af99106704d7/how-to-obtain-duhamels-integral-using-cc?forum=1726&prof=required

Updating Custom Field

$
0
0

Hello All,

I've not done too much with Project Online (so please be kind with your answers :-)), but know I used to be able to run SQL queries to update Project Server databases. What I'd like to do now is develop an Integration Services routine to take data from an Excel worksheet extracted from Project Online and manually updated, and use it to update a Project Priority field so that I can run Portfolio Analysis and specify that field to use for the priority.

I know I can't see the databases anymore through SSMS, I need to use Power BI and OData to run queries, but how do I see the schema of the real databases, and how do I update them? Is there a better way to do what I'm doing? We're using a 3rd party tool to prioritize and would prefer an automated way to update Project Online than to go to every project in the browser and update that way. Any and all help is greatly appreciated! Cheers, Ray

Task.Owner for ProjectServer on premise

$
0
0

Hi Guys, 

I noticed that recently Task.Owner property was added to CSOM for project online, 

any idea when it will reach project server on premise dll?

Thanx

With kind regards

Maxim


From Project Techcenter

Integration with TFS

$
0
0

Hello,

We're using TFS 2017 Client, and Project 2016 Online, and I'd like to integrate the 2 products. When I create tasks in TFS, I provide a Start Date, Finish Date, work estimate, work completed and work remaining, and it looks like in the default mappings that it should update these fields when I do a Refresh in Project, which should update like work ids and add new work ids. Am I right in assuming this? I want to go from TFS to Project, adding new and updating existing. Is this a feature that's used a lot? Any good documentation available on how to configure. As always, any clues provided to the clueless are greatly appreciated!

Cheers, Ray


Problem with CheckIn project using Project Server 2013 REST API

$
0
0

Hello,

I'm trying to check in the project.

The algorithm is: - POST CheckIn request - receive QueueJob;    -- if completed - done   -- if not completed (processing)       - wait        - GET Projects('GUID')/QueueJob('GUID')          -- if completed - done          -- if not completed - goto wait 1. POST call to http(s)//myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/Draft/CheckIn('false') 2. Getting back the QueueJob:

<entry xml:base="http://vmw4755:8080/PWA/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:ns2="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:ns3="http://schemas.microsoft.com/ado/2007/08/dataservices">

<id>http://myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')</id>

    <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="PS.QueueJob"/>

    <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')" rel="edit"/>

    <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')/Project" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Project" title="Project"

       type="application/atom+xml;type=entry"/>

    <link href="ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')/Submitter" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Submitter" title="Submitter"

       type="application/atom+xml;type=entry"/>

    <title/>

    <updated>2018-09-13T03:45:09Z</updated>

    <author>

       <name/>

    </author>

    <content type="application/xml">

       <ns2:properties>

           <ns3:Id ns2:type="Edm.Guid">9fbfdb67-07b7-e811-9b41-005056a207f2</ns3:Id>

           <ns3:JobState ns2:type="Edm.Int32">3</ns3:JobState>

           <ns3:MessageType ns2:type="Edm.Int32">21</ns3:MessageType>

           <ns3:PercentComplete ns2:type="Edm.Int32">37</ns3:PercentComplete>

           <ns3:WaitMilliseconds ns2:type="Edm.Int32">1000</ns3:WaitMilliseconds>

           <ns3:WaitTime ns2:type="Edm.Time">PT1S</ns3:WaitTime>

        </ns2:properties>

    </content>

</entry>

All the good stuff is there: JobState - Processing, MessageType - checking in, wait - 1 sec. 3. waiting for 1 sec (sleep(1000)) 4. GET using the link: http://myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs('9fbfdb67-07b7-e811-9b41-005056a207f2')

I would expect getting back updated QueueJob, but instead getting this:

<?xml version="1.0" encoding="utf-8"?>

<d:GetById xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:null="true" />

 

Next, tried just to get all of the QueueJobs: GET using the link:http://myProjectServer/PWA/_api/ProjectServer/Projects('e140492f-d742-4a2f-88c3-3fe30edf16c1')/QueueJobs (tried within the code and just directly from the browser - same result)

<?xml version="1.0" encoding="utf-8"?>

<feed xml:base="http://vmw4755:8080/PWA/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">

    <id>5ed485e5-6ac1-4cf0-99d1-cb14e7637532</id>

    <title />

    <updated>2018-09-13T05:30:19Z</updated>

    <author>

       <name />

    </author>

</feed>

Do not see any jobs, but at least CheckIn should be there? Right?

Opened the PWA, went to Server Settings and I can see the job there:
9fbfdb67-07b7-e811-9b41-005056a207f2 N/A 9/13/2018 5:45 AM 9/13/2018 5:45 AM E-9990 Project Checkin Success 100%

What am I doing wrong?

How can I get the all QueueJobs?

I'm using Project 2013 and Java-based client.

HELP!

Thanks.

PSI Project Copy custom fields

$
0
0

I have a Project Server 2013 solution. In solution I am trying to update Custom Fields using PSI. On test server (one server) - work fine. But on Production servers(2 WFE + 2 APP servers), when task Custom Fields to much, i get exceptions:

System.NullReferenceException: Object reference not set to an instance of an object) OR (System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralSecurityAccessDenied Instructions: Pass this intoPSClientError constructor to access all error information).

Task run through TimerJob, 10 copy task every 3 minute. TimerJob run on WFE server. Else task not match, then work.


MSProject addin create an 1101 error when run on MSP2016, but works fine with MSP2010

$
0
0

Hi,

I use an addin to send my task information from MSProject to the Clarity.

my MSProject Addin is working properly when I use MSProject2010, Clarity v15 and Clarity PPM Addin v14.

When I switch to different environment (MSP2016, Clarity v15 and Clarity PPM Addin v 15, subroutine (below) returns an 1101 error. It is strange, because errors is generated in different lines of this subroutine even the same Project file is used.

This subroutine is rather simple, it  rewrite the MSProject values to the Clarity buffer.

All MSGboxes are temporary fot debugging  (except the last one)

Any ideas about the reason?

Private Sub AllignTasks(ByRef iLocalTask As MSProject.Task, ByRef iClarityTask As MSProject.Task)

        Dim vShortName As String
        Dim vMilestoneTag As String
        Dim vTaskNameLength As Integer

        Dim vFlag As Boolean

        vFlag = False

        On Error GoTo ErrHandler
        MessageBox.Show("sTART date= " & iLocalTask.Start & vbLf & "Start date Baseline= = " & iLocalTask.BaselineStart & vbLf _
                        & "Finish Baseline= " & iLocalTask.BaselineFinish, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        If Len(iLocalTask.Name) > 150 Then
            vMilestoneTag = GetMilestoneOrObjectiveTag(iLocalTask.Name)
            vTaskNameLength = 146 - Len(vMilestoneTag)
            vShortName = Left(iLocalTask.Name, vTaskNameLength) & "... " & vMilestoneTag
            iClarityTask.Name = vShortName
        Else
            iClarityTask.Name = iLocalTask.Name
        End If

        MessageBox.Show("After Task Name", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        iClarityTask.UnlinkPredecessors(iClarityTask.PredecessorTasks)
        MessageBox.Show("After UnlinkPredecessors", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)
        iClarityTask.UnlinkSuccessors(iClarityTask.SuccessorTasks)
        MessageBox.Show("After UnlinkSuccessors", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)
        iClarityTask.Manual = True
        MessageBox.Show("After Manual", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)
        iClarityTask.Milestone = True
        MessageBox.Show("After Milestone", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        ' to mark that the task is used to store milestone info at the level 1 rather than a project.
        vFlag = True
        '  iClarityTask.Flag20 = vFlag                 'True

        MessageBox.Show("After Flag20= " & iClarityTask.Flag20, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        If iLocalTask.Text9 = "M/CS" Then
            If IsDate(iLocalTask.Start) Then
                iClarityTask.Start = iLocalTask.Start
                iClarityTask.Duration = 0
                'iClarityTask.Finish = iLocalTask.Start
                If IsDate(iLocalTask.BaselineStart) Then
                    iClarityTask.BaselineStart = iLocalTask.BaselineStart
                    iClarityTask.BaselineFinish = iLocalTask.BaselineStart
                End If
            End If
        Else
            If IsDate(iLocalTask.Finish) Then

                iClarityTask.Start = iLocalTask.Finish
                iClarityTask.Duration = 0
                'iClarityTask.Finish = iLocalTask.Finish
                If IsDate(iLocalTask.BaselineFinish) Then
                    iClarityTask.BaselineStart = iLocalTask.BaselineFinish
                    iClarityTask.BaselineFinish = iLocalTask.BaselineFinish
                End If
            End If
        End If
        MessageBox.Show("After M/CS; Text1= " & iLocalTask.Text1 & "; Text9= " & iLocalTask.Text9, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        ' clarity key task seting it for new tasks

        'iClarityTask.Flag1 = vFlag                   'True
        MessageBox.Show("After Flag1= " & iClarityTask.Flag1, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        iClarityTask.Text1 = iLocalTask.Text1
        MessageBox.Show("After Text1= " & iClarityTask.Text1, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        iClarityTask.Text9 = iLocalTask.Text9

        MessageBox.Show("After Text9= " & iClarityTask.Text9, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        If iLocalTask.PercentComplete = 100 And IsDate(iLocalTask.ActualFinish) Then
            iClarityTask.ActualFinish = iLocalTask.ActualFinish
        End If

        MessageBox.Show("After Percent Complete", RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK)

        Exit Sub

ErrHandler:
        'System.Diagnostics.Debug.Print(Err.GetException.StackTrace)
        Dim msgStr As String
        msgStr = "Error encountered when uploading local task to Clarity in AllignTasks sub at: " & vbLf
        If Not iClarityTask Is Nothing Then msgStr = "Clarity Task in AllignTasks sub " & iClarityTask.Name & vbLf
        If Not iLocalTask Is Nothing Then msgStr = "Local Task in AllignTasks sub " & iLocalTask.Name & vbLf
        msgStr = msgStr & Err.Description & " (#" & Err.Number & ") at " & vbLf

        MessageBox.Show(msgStr, RUN_CLARITY_UPLOAD_MSGBOX_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
       
    End Sub

Best regards

Maciej Majkowski


MaciejMajk


Project Server & Central Admin is not working after installing MPP on the server(2016 version)

$
0
0

Hi, 

We've Project server 2016 on premise environment. I had to install MPP on the DEV server to test one of the functionality that we implemented. But after installing MPP 2016 everything stopped working on the server including Central administration and we're not able to find the related errors on the log file. Posting couple of issues screenshots for your reference. We followed We've tried to fix them for almost a full day but finally we're able to resolve it by running a share point "Repair" setup. Is there any bug in MPP (or) will there be any way to fix these issues without repairing the share point server?

FYI, have tested this in two different server. However, came across the same problem.

Thanks.



I have JSON response and want to get the item and position value dynamically.

$
0
0

Hi

I have JSON response and I want to get the Item and Position values. Where is it in the tree structure I want the Item and Position. In C# WPF

"address": [
    {
      "item": {
        "country": "USA",
        "locality": "Rio Rancho",
        "postal_code": "87124",
        "region": "New Mexico",
        "street": "1380 Rio Rancho Blvd SE #363",
        "type": [
          "work"
        ]
      },
      "position": "168,124,399,124,399,169,168,169"
    }
  ],
  "comment": [
    {
      "item": "CELL",
      "position": "554,277,596,277,596,291,554,291"
    }
  ],
  "email": [
    {
      "item": "aynejames@me.com",
      "position": "532,114,746,114,746,139,532,139"
    }
  ],
  "formatted_name": [
    {
      "item": "Wayne Stansfield. CLCS",
      "position": "55,178,399,178,399,208,55,208"
    }
  ],
  "label": [
    {
      "item": {
        "address": "1380 Rio Rancho Blvd SE #363 Rio Rancho, NM 87124, 87124",
        "type": [
          "work"
        ]
      },
      "position": "168,124,399,124,399,169,168,169"
    }
  ],

"name": [
    {
      "item": {
        "family_name": "CLCS",
        "given_name": "Wayne Stansfield."
      },
      "position": "0,0,0,0,0,0,0,0"
    }
  ],
  "organization": [
    {
      "item": {
        "name": "Luarris Insurance"
      },
      "position": "54,300,400,300,400,351,54,351"
    },
    {
      "item": {
        "name": "A Legacy Of Qu(zlity Service '"
      },
      "position": "124,271,393,271,393,294,124,294"
    }
  ],

If there are two Items like in Organization tab it should return both Item1,2 and Position1,2 .

It is completely dynamic Address, Name, Email which are the starting Key values of the JSON response those also be may or may not there. And if there is any new key then the Item and Position value of that new key should also be returned.

Can anyone help me out from this problem? 

Custom Field Format Percentage and Round?

$
0
0

Hi all,

I´m using Project Proffessional for office 365.

I´ve set up 3 Custom Fields (Total, Done & Percentage).

In the Percentage field my formula is:

Format(Done/Total)*100 & "%"

The formula works fine but the result has too many decimal places -> my result is for instance83,8235294117647% instead of ex. 84 or 83,8 would be just fine!

I´ve tried other versions of this formula to get my desired result, unfortunately it doesn´t work, for example I tried this one:

Format(Done/Total)*100, "0%" & "%"

Any ideas?

Regards


VBA to automatically change Project Options

$
0
0

Hi.

Do you know if it's possible to change Microsoft Project Options using VBA.

We wan't to programatically change the option "baseline for Earned Value calculation", from baseline to baseline 1.

Thanks.

Static WBS Numbering

$
0
0

I'm wondering if this is a common problem/question.  We have a WBS defined, but sometimes we have projects that don't fit the WBS exactly so we end up removing a task or two from the overall schedule.  We want to display the WBS number next to the tasks in MSProject, but when you remove a task, it results in a renumbering of your WBS field.  Those numbers are tied to our ERP system for billing, so we need those numbers to be static. 

I was thinking of just creating a separate WBS field that doesn't use the autonumbering that MSProject provides.  Is this my only recourse?

Viewing all 4809 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>