Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Working with Scripts

3 replies [Last post]
Bogdan Leonte
User offline. Last seen 5 weeks 6 days ago. Offline
Joined: 18 Aug 2012
Posts: 284

Hello,

First of all I have to say I have little experience working with Spider Project. I have been trying to create scripts in order to perform complex tasks faster when I hit a dead end trying to create a script for risk analysis. The script looks like this:

 

PROJSETOPTPROJ (TST_Pr1_OPT, 1, Proiecte);
PROJSETPROBPROJ (TST_Pr1_CMP, 1, Proiecte);
PROJSETPESSPROJ (TST_Pr1_PES, 1, Proiecte);
PROJSETRISK (PROBOPT:N, USEDIRFIN:N, RECTIME:Y);
PROJSETRISKCOMMON (DurSumD, 70, Fin, 70);
PROJSETRISKCOST (Ch_AC, 70, Ch_D&UM, 70, Ch_Ind, 70, Ch_MAT, 70, Ch_OS, 70, Ch_SubA, 70, Ch_TR, 70, Ch_UT, 70);
PROJSETRISKCOSTCENT (Ch_RP, 70, Ch_S, 70);
PROJSETRISKUSERFIELD (prf_risc, 70);
PROJCALCRISK ();

When I execute the script I get the following message:
 I don't understand why I get this message since I have set the Default Storage for Projects the storage in which I have stored the 3 project versions.

Replies

Rafael Davila
User offline. Last seen 6 hours 11 min ago. Offline
Joined: 1 Mar 2004
Posts: 5229

At the Opened Documents Window select the folder you want to convert to Default, click storage properties icon

Photobucketthe first from the left

and click on the Storage Properties Windows the Default options of your choice. If already a Default option you will only be able to make it non-default by selecting another.

If the folder you are looking is not on thew window you got to make it available by clicking the add storage icon [the second icon on the above figure].

Photobucket

By the way I never use manual script coding, I create simple scripts with the record option and use the editor to combine several simple scripts into a single one if necessary with copy and paste, easier than recording a long procedure.

Good luck

Bogdan Leonte
User offline. Last seen 5 weeks 6 days ago. Offline
Joined: 18 Aug 2012
Posts: 284

Thank you, I will try creating the script by recording the user movements. I have one question to your answer, How do I set Default Storage Location, mine is in C:\Documents\Spider Project, how do I change this to another location?

Rafael Davila
User offline. Last seen 6 hours 11 min ago. Offline
Joined: 1 Mar 2004
Posts: 5229

You have set the default storage locations [not sure is a requirement but you shall be on the safe side here], you have stored the 3 project versions but have you set them up under Risk Analysis - Options [manually or via a script] before a command looks for it under Risk Analysis - Options? maybe if options are not defined access will be denied under such command.

Also I suggest creating the script by using the Record option and compare the code if the above does not helps. Perhaps "Projecte" is a valid reference for some commands while for others the syntax requirements is different, the commands can correctly interpret the fists two entries separated by a comma but not the last entry, here the recorded script can give you some clues.