Script: Creating Personal Folders

Creates a personal folder

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 14.08.2006
Updated: 15.10.2024 | Added Python Script

The script creates a personal folder for the current user. This folder appears as the root folder once the user is logged in and can be populated by the user.

Version

Version description Scripting
from version 5.8 Python script to create a personal folder CreatePersordner.py

Execute

On the user to which you want to add the folder.

Script text

#---Description: Creating Personal Folders
# Class: Project Editor
#   ObjectScript: Yes
#   ContainerScript: No
#   EventType: None
#   EventClass:
#   EventMembers:
#   ExtendedRights: No
#---This script creates for the current user a
# folder. This will appear as the root folder,
# As soon as the editor user logs in.
#---05.07 Vertec AG: created.
#---29.10.2013, sr: msgbox replaced by vertec.msgbox.
#---19.12.2018, sth: rewritten in Python.

def main(user):
    if not bearbeiter.eval('oclisKindOf(project user)'):
        vtcapp.msgbox('Personal folders can only be created for users. Please run the script on an user.')
    else:
        # Create new personal folder
        persfolder = vtcapp.createobject(“Personal Folder”)
        persordner.bezeichnung = “Personal Folders”
        persfolder.idx = 0
        persordner.canhavesubordner = True
        persordner.abstractUserAsRoot.append(user)
         
main(argobject)
Bitte wählen Sie Ihren Standort