add user to user group, delete user from user group

C#. Wrapped PW SDK.

Hi,

I cannot find the methods to add users to user groups and delete users from user groups.

Are these methods available in the SDK?

I guess we must use the SDK - correct?

We cannot simply modify the rows in the DBO.DMS_GRPM SQL Table - right?

Thanks,

Kevin.

Parents
  • A few words of advice...

    The API functions that you are looking for are in the "ProjectWise DMS API" module documented in the ProjectWise SDK help file, aaApi_AddUserToGroup() and aaApi_RemoveUserFromGroup(). However, your customization must log into the datasource with the "administrative" type login. Basically, you need to call aaApi_LoginDlgExt() using the flag AALOGIN_ADMINISTRATIVE as well as the user actually belonging to the Administrator group.

    Directly modifying ProjectWise database tables is strongly discouraged, and the results are "not supported". Please keep in mind that ProjectWise is NOT a database application. Not all "relationships" are found in the database schema as well as a lot of data is cached either on the server or on the client and only updated when ProjectWise "knows" that it has changed, so even changing "safe" data can be ignored until ProjectWise thinks it has changed and refreshes the associated caches.

    I don't currently have the ProjectWise PowerShell extentions on my machine, but I'm pretty sure that you can create a PowerShell script using them to create or modify users or groups, so you may want to consider that approach if you are simply trying to "bulk" load or update the contents of ProjectWise users, groups or user lists, particulary if you are able to supply a CSV file as input to your script.

    Answer Verified By: Kevin 

Reply
  • A few words of advice...

    The API functions that you are looking for are in the "ProjectWise DMS API" module documented in the ProjectWise SDK help file, aaApi_AddUserToGroup() and aaApi_RemoveUserFromGroup(). However, your customization must log into the datasource with the "administrative" type login. Basically, you need to call aaApi_LoginDlgExt() using the flag AALOGIN_ADMINISTRATIVE as well as the user actually belonging to the Administrator group.

    Directly modifying ProjectWise database tables is strongly discouraged, and the results are "not supported". Please keep in mind that ProjectWise is NOT a database application. Not all "relationships" are found in the database schema as well as a lot of data is cached either on the server or on the client and only updated when ProjectWise "knows" that it has changed, so even changing "safe" data can be ignored until ProjectWise thinks it has changed and refreshes the associated caches.

    I don't currently have the ProjectWise PowerShell extentions on my machine, but I'm pretty sure that you can create a PowerShell script using them to create or modify users or groups, so you may want to consider that approach if you are simply trying to "bulk" load or update the contents of ProjectWise users, groups or user lists, particulary if you are able to supply a CSV file as input to your script.

    Answer Verified By: Kevin 

Children