Revit API – Issue Spheres Generator

After developing the Revit macro that reads CSV and places the issue sphere into corresponding location, I wanted to have an UI so that user can specify which CSV file they want to read. So I started to transfer the macro code into Revit API code.

Using Windows form and make Revit communicate with it wasn’t easy job; it required to use a method called BackgroundWorker and external event handler. I needed to use the backgroundworker because I wanted to show the progress bar moving during the sphere creation. To do it, code has to be executed into two different thread, one generating spheres, while other updating the progress bar. Also, I had to use external event handler since Revit did not allow external application or Windows form to access to themselves and do something. I’m a not very good programmer so it wasn’t easy for me to implement all these methods. Although the tool looks a bit simple, code behind it is not like it.
capture
Issue Sphere Generator UI and generated spheres


[This article has been copied from hojoongchung.wordpress.com. The original article has been written on Apr 5, 2016, 9:52 PM]

댓글

이 블로그의 인기 게시물

Project Owl: Kinect V2 Point Cloud Generator for Grasshopper

Project Owl: Video is up!

Where to find Revit Journal files?