May I have some guidance towards creating a .dll in c# to work with the ProjectWise Client?
We downloaded the C++ SDK for ProjectWise and have been looking at the functions. We are able to get the functions working in C# using wrappers. Ex:
[DllImport("c:\\Program Files\\Bentley\\ProjectWise\\bin\\dmawin.dll", CharSet = CharSet.Unicode)] public static extern IntPtr aaApi_LoginDlgExt(IntPtr hWndParent, StringBuilder lpctstrTitle, uint ulFlags, StringBuilder lptstrDataSource, int lDSLength, StringBuilder lpctstrUsername, StringBuilder lpctstrPassword, StringBuilder lpctstrSchema);
public IntPtr PWAdminLogin(IntPtr hWndParent) {
return aaApi_LoginDlgExt(hWndParent, null, 0, null, 50, null, null, null); }
We have also done research on the Custom Module that comes with ProjectWise to import .dll. I run the following .exe, "C:\Program Files (x86)\Bentley\ProjectWise\SDK\bin\x86\custreg.exe", and choose the function in the .dll I want ProjectWise to use.
I would like to do a function in C# using wrappers and import the C# .dll in the ProjectWise bin. The function I was lookin at is aaApi_AddCustomMenuItem.
I would like to make my own menu items, that when a user clicks on them is process other functions from the .dll. Could I have an example or guidance on how to do this? I can not able to get the aaApi_AddCustomMenuItem to display when I launch ProjectWise.
You would be much better off writing it in C++ for the ProjectWise client. Have a look at the samples in the SDK, I believe there is a menu sample.
Have a look at this - communities.bentley.com/.../project-wise-sdk-c