Products

Identifying API Changes

By jnewell

I always try to make it a habit to read the readme.txt for each release of Solid Edge. Specifically, I’m looking at the API section to see what problem reports (PR) got fixed. Today I was reading through the Solid Edge ST8 MP readme.txt and noticed the following snippet.

===API===

PR 7527082: Added a API to identify specified Solid Edge file is newer version

While that description peaked my interest, I really had no way to know what was added to the API to make this possible. This is just one example but the bigger concept is how can we gain visibility into Solid Edge API changes between releases? I’ve written applications that compared the type libraries and reported differences in the past but I didn’t really want to dig it up. I searched for (and found) an alternative that I will now demonstrate.

Say hello to BitDiffer. BitDiffer is a .NET Assembly Comparison Tool and is an open source project on GitHub by Greg Ennis. I wasn’t really interested in the source code since I already have a good understanding of how to write the code. I was looking for a pre-built solution so I just downloaded the latest release.

The next question is where am I going to get Interop assemblies for each version of Solid Edge that I’m interested in comparing. Then I remembered that I author the Interop.SolidEdge NuGet package. I release an updated version of this NuGet package for each release of Solid Edge. I download the 108.3.0 and 108.4.0 release of each package so that I could compare Solid Edge ST8 MP3 vs MP4.

explorer-interop-folder.png

Since the .nupkg files are nothing more than .zip files, you can use your favorite ZIP extractor to extract the Interop.SolidEdge.dll files. *If you’re not using 7zip, you may have to rename the file to .zip first.

7zip-nupkg.png

Now that we have the Interop .dll’s extracted, we’re ready to use BitDiffer. It took me a few tries before I figured out how to get it to show me what I wanted but I’ll save you the effort by showing you step-by-step.

Once you get the latest release of BitDiffer downloaded, extract the .zip and run BitDiffer.Client.exe.

bitdiffer.png

After clicking the New button, you’ll be prompted for configuration information. I’ve found that the order of the assemblies is important. Add Interop assembly 108.3.0 first then 108.4.0. 

bitdiffer-assembly-selection.png

Since we’re only interested in what changed, check the Changed Items Only button. This single option will significantly improve performance since the assemblies are rather large.

bitdiffer-view-filter.png

After clicking OK, we are presented with a wonderful view of what’s changed between the different releases of Solid Edge. Going back to my original readme.txt query, I was able to quickly identify the API method that Solid Edge development added in MP4 as mentioned in the readme.txt.

bitdiffer-comparison.png

The process that I’ve outlined in this article has so many use cases. You can quickly see what API changes have been made between releases. You can find when particular APIs were released for backwards compatibility purposes. I’m always looking for new things to talk about so I’ll be using this for interesting API additions in the future.

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/solidedge/identifying-api-changes/