Projectwise API and C#

A general question:

 Has anyone had luck manipulating the Projectwise API using C# and the .net framework? I've seen a few 'sample' snippets out there, but none of them compile or come close to working. I'm interested to know if anyone has used the API and been able to do interesting things like: navigate the project hierarchy, create sets of drawings, chnage the status on a drawing, etc. 

Any help or insight would be appreciated. We can even take the discussion to email if you would like. Thanks, in advance.

Mark

Parents
  • Dalius is correct; currently the ProjectWise API is a C API. However in ProjectWise 8i we have .NET API for Web Parts. This does not mean you cannot use C# with ProjectWise. You can use P invoke to call the ProjectWise API. I placed a simple example showing how to do this on ftp://ftp.bentley.com/pub/outgoing/PWCSharpExample.zip

    I hope that this will help.



  • Dear Michael,
    We are hitting on the question of whether to move from C++(MFC) to C#, we have a good code base that implements hook call backs, menu call backs, custom project property pages, Creates Save Searches at login etc as well as some standalone server based administrator tools.


    Thank you for your clear  and simple example.


    It looks like the C header files have to be translated to the "#region Projectwise DLL Imports" as do the types and structures in your example, for a simple create project example = ok but with all the structures and types we have used I fear any porting would mean some serious work just to in produce the import section. Some of the API calls in your example require wrapper functions for example Guid aaApi_GetDocumentGuidProperty(int PropertyId, int Index) may be there are more in this category ?

    * Is a complete .net import section for the whole API available from Bentley (or will it be in the near future or via special criteria) ?

    * One detailed question how would a API call back function (hook function/menu call) be implemented in C# .


    There is considerable pressure from our IT.Dept to start new work in C# or other dotnet language.
    Best Regards,

    Ian Emery

     

     

     

     

     
  • Ian,

    At this point in time there is not a “complete .net import” available. As you can see that wrapping native code with .NET is not always a simple thing to implement. You will need to make the decision if this is cost effective to port to .NET. As we integrate more .NET technology into ProjectWise there will be a need for a .NET ProjectWise API. There are no timelines that I know of on when or if this will happen. To answer your question on call backs in C# one method comes to mind. You can write your .NET wrapper class as a COM object. You will then write what you want to do in .NET in this class. In ProjectWise you can write the C/C++ dll that will implement your com object and you can react to the Hooks and menu items as desired using the .Net of choice.  Just a thought.

    Mike



  • Hi there
    We are using Pw SDK and .NET at Swedish Rail Administration.
    We have built our own wrapper. The problem we have sometime is to convert c/c++ datatypes to c# datatypes outherwise its working nice..



    Does anyone know when v8i SDK is released and if there is and SDK for the webparts ?

    Best

    /Henrik/

     

  • The ProjectWise V8i SDK will be released by the end of the week. We did the final build last night.



  • Yes, there is a web parts customization guide with some samples included in the ProjectWise V8i SDK.
  • The SDK for ProjectWise Integration Server V8i has been posted for download to the Bentley Developer Network portion of SELECT Downloads.  Users must be a member of BDN to access this SDK.      This SDK includes APIs for customizing ProjectWise Explorer/Admin as well as a new API for customizing ProjectWise Web Parts.  An Impact Statement describing changes to the SDK/APIs relative to the ProjectWise V8 XM Edition SDK is included in the installation.

     

    HTH,

    John

          

Reply
  • The SDK for ProjectWise Integration Server V8i has been posted for download to the Bentley Developer Network portion of SELECT Downloads.  Users must be a member of BDN to access this SDK.      This SDK includes APIs for customizing ProjectWise Explorer/Admin as well as a new API for customizing ProjectWise Web Parts.  An Impact Statement describing changes to the SDK/APIs relative to the ProjectWise V8 XM Edition SDK is included in the installation.

     

    HTH,

    John

          

Children
No Data