[How to] SketchUP and C# /.Net or WPF

I’ve never had the need to manipulate SKP files outside of SketchUp. I think I do remember seeing a C# wrapper for the C SDK, but have never used it. C# is my favorite language, and with WPF it is easy to design a very nice UI.

In this thread I did post some code where I had a WPF app communicating with SketchUp.

The problem with that approach is that the WPF app is a separate app, so clicking the SketchUp window hides the WPF window behind SketchUp (unlike the SketchUP HTMLDialog window which stays on top). I could set my WPF window to be ‘always on top’ but that is a real nuisance because it stays on top of other apps as well. I’m in the middle of doing a major update to my Building Creator extension, and I’m going back to all HTMLDialogs for the UI. There are still things I plan to use C# for such as generating xlsx spreadsheets. Ruby in SketchUp is limited when it comes to things like that. For that case I’ll probably write the C# app as a command line app that runs in the background.

Another reason I’m going to all HTMLDialogs, is because I still have my fingers crossed that SketchUp will someday implement docking HTMLDialogs as a first class citizen in SU.