ProjectWise Connect - Custom Module debug

I am trying to run the ImageViewer sample that comes with ProjectWise CONNECT SDK.

As given the readme.txt file, I built the solution in release mode and placed the dll in the projectwise\bin directory.

After registering the module, when I open PW explorer, I can see the Image Viewer tab added, but blank. No image being displayed for the selected drawing.

How can I debug this sample application? I want to debug and see the results.

  • Aparna,

    I don't see a sample named "ImageViewer", so I'll assume that you mean "imageviewpanel".  I am using version 10.00.03.140 of the SDK and version 10.00.03.167 of ProjectWise Explorer as well as Visual Studio 2015.

    First of all, to debug the code, you will need to build it in Debug mode, not released mode.

    Secondly, you will need to setup your debugging environment.  There's more than one way to do this, but the way I do it is I set the project imageviewpanel as the startup project, and set the "Command" value in the Debugging settings as "C:\Program Files (x86)\Bentley\ProjectWise\bin\pwc.exe" instead of the default "$(TargetPath)", since this is a Custom Module (DLL) and not an application.

    For debugging, you can use command line switches to automate logging into your datasource, such as "-d PWCEDWW:PWDemo -u username -p cleartextpassword" to the Command Argument setting.

    Make sure that you configure this DLL as an x86 Custom Module.  The SDK is delivered to the x64 "Program Files" tree, but ProjectWise Explorer is an x86 application.  Since you say that you see the Image Viewer tab, you must have it configured correctly.

    FWIW, I always put a break point on the entry function, in this case "CustomInitalize", so that when I start the debug session, I can tell that the DLL is being loaded.

    Then just put break points on the parts that are of interest to you.  

    Without any changes to the code, and using the "demo" datasource provided with the ProjectWise Administrator, if I navigate to pw:\\PWCEDWW:PWDemo\Documents\BSI200 - Peterborough Geospatial Investigation\Standards\data\c-crest.jpg, I can see an image in the Image Viewer tab.

    HTHs

    Answer Verified By: Aparna Kapaley