1 / 21

Developing a PDMWorks Enterprise add-in in Microsoft VB.NET 

Developing a PDMWorks Enterprise add-in in Microsoft VB.NET . Jonathan Freeson Senior Consultant / Partner xLM Solutions, LLC. Overview. Programming with the PDMWE API Development and Debugging Techniques

gannon
Download Presentation

Developing a PDMWorks Enterprise add-in in Microsoft VB.NET 

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Developing a PDMWorks Enterprise add-in in Microsoft VB.NET  Jonathan FreesonSenior Consultant / Partner xLM Solutions, LLC

  2. Overview • Programming with the PDMWE API • Development and Debugging Techniques • Using the VB.NET Example Program in the API Help File found on the PDMWE CD (API_GB.CHM) Note: There are hidden slides and slide notes in the deck that go into more detail in some areas.

  3. API: Very Important Change in PDMWE 2008 • Visual Basic 6 is no longer supported. • VB6 applications upgrade to VB.NET Relatively Easily

  4. API: Requirements • Suggest Microsoft .NET 2.0 Development Environment • Documentation has screenshots showing Visual Studio/Visual Basic 2002 which is .NET 1.0. • 64 Bit Support introduced in .NET 2.0 • SQL 2005 uses .NET 2.0 • Visual Basic 2005 and 2008 can target .NET 2.0 • Visual Basic Express Edition can be used in a limited fashion

  5. Development : Getting Started – Creating The Project • Start Microsoft Visual Basic 2005 or 2008 • Create a new “Class Library”

  6. Development: Visual Basic 2008 Notes • Default target runtime is .NET 3.5 • .NET 2.0 is more common that 3.5 and is more likely to be installed on all clients. • Target should be changed to .NET 2.0

  7. Environment Setup – Adding References • 2007 and 2008 use the “EDMLIB” COM Library.

  8. Environment Setup – Adding References • Adding the COM reference creates an “COM Interop Assembly” called “Interop.EdmLib.DLL” • This DLL is a wrapper/bridge between .NET and COM • Very important: The Interop.EdmLib.DLL that is automatically created must be deployed with the Add In DLL.

  9. Environment Setup – Project Settings • In VB 2005 and 2008, mark Assembly as “COM-Visible.”

  10. Writing Code – Implementing Interface • The class that is called from PDMWE must implement the EdmLib.IEdmAddIn5 interface.

  11. Getting Started -- Interfaces • GetAddInInfo • Called by PDMWE to determine what the AddIn is capable of • Specifying which version of PDMWE is supported • Events to which it is subscribed • OnCmd • Called whenever a subscribed event occurs • Can abort/cancel certain operations

  12. The API • Uses a lot of Object Orientated Programming (OOP) structures. • Not easily visible to the development environment • Examples: • Multiple versions of same object exist. IEdmVault7 is compatible with IEdmVault6, IEdmVault5, etc. • An IEdmVault object can also be a IEdmVariableMgr5. • Well documented in the API_GB.CHM file found on the PDMWE CD. Good starting point.

  13. Developing And Debugging • Using example from API_GB.CHM

  14. Compiling And Deploying Test Version

  15. Debugging • Up to now, everything could be done with “Express Editions” of Visual Basic. • Debugging requires a full Visual Studio • PDMWE runs as part of Windows Explorer • Use Visual Studio to Debug the “explorer.exe” process • Usually requires explorer.exe to be killed so close important windows and save work • Tips: In windows, CTRL-SHIFT-ESCAPE brings up task manager • Can be used to start explorer.exe when it is killed and there is no task bar to right click on.

  16. Debugging – Attaching to running explorer.exe • Attach to running explorer.exe

  17. Debugging – Create new explorer.exe • Recommended: Kill existing explorer.exe then use debugger to start new one

  18. Debugging Demonstration • Attaching to existing explorer.exe via the “Debug -> Attach Process” command • Configuring Visual Studio Project to start explorer.exe for debugging • Must kill explorer.exe before starting

  19. Production Deployment • VERY Important to select ALL the .DLL files

  20. Questions?

  21. Contact Information • Jonathan Freeson – Managing Partner, xLM Solutionsjfreeson@xlmsolutions.com+1-517-579-9539 • Slide materials and the VB.NET project file can be found at: http://www.xlmsolutions.com/sww2008

More Related