Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66667

Re: DocumentChanged versus PostRequestForElementTypePlacement

$
0
0

Hi Ari,

No problem.

 

To use the DocumentChanged event with PostRequestForElementTypePlacement, you would need to have the event working outside the context of your external command (i.e. an application level event). While this would work, it would take 'overhead' - use up system resources - and wouldn't be transparent to the user with regards to undoing and redoing transactions. (You would need to do have the event working outside the context of your command because the PostRequestForElementTypePlacement function doesn't actually start until your command returns control to Revit - read the page on the link I provided for further details.)

 

An iUpdater is *definitely* the way to go. They sound scary, but are actually quite simple (especially if you're only worried about created elements - as opposed to modified). An iUpdater uses the open transaction to 'slip' modifications in.

Jeremy Tammik has a blog post with sample code that may guide you: http://thebuildingcoder.typepad.com/blog/2010/08/structural-dynamic-model-update-sample.html

There are also examples in the SDK.

 

Let me know if you have any further questions.

 

Cheers,

 

-Matt


Viewing all articles
Browse latest Browse all 66667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>