Author Topic: Transaction during a close event?  (Read 5843 times)

0 Members and 1 Guest are viewing this topic.

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Transaction during a close event?
« Reply #15 on: September 16, 2014, 09:34:08 AM »
Hi Jeff,


No worries.  Your code that you posted did remind me that I did not check for null when i cast the object to a pipe.


For anyone that wants it i have added the project files to this post.  While it does show how to automatically add insulation to a pipe based on the system name, more importantly it shows how to override the close method of an object instead of using an event handler. (Thanks to Kerry for reminding me to include the final product.)


A more robust solution is in the works that will remove the hard coded systems and insulation sizes and will instead have an user interface where the system name can be selected and insulation can be assigned to pipe sizes.  Insulation data will also be added as property set information.


Again, thanks to everyone that contributed to this thread.  Everyone's post somehow made it into the final product.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013