
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello world,
Last week I was trying to develop some extra functionality within Revit which automatically registers when and who ads or modifies family types and instances. To realize this I introduced some project parameters that are assigned to the specific families. What I am trying to do is that when something is added or modified, the parameters automatically are set. So far, so good.
I've tried multiple solutions but until now I just can't figure out the last step. To retrieve the elementid's I've tried a documentchanged event which does find the right id's but, because the event isn't meant for changing or manipulating elements in any way what so ever, I got stuck.
Another solution I've tried is the use of IUpdaters. When it comes to modifying it does the job fairly good job. However, copying elements doesn't work seem to work properly: when I copy an instance, the parameters of the newly created element are set to the values of the original element. Besides this issue I stumbled upon a bigger problem: adding instances. Where the DocumentChanged event retrieves all the elements, the IUpdater can't retrieve the last element because the timing comes in a bit earlier than the DocumentChanged event. Example: when I'm placing a wall chain of three walls, the first two walls are set properly but the parameters of the last one comes empty.
My question: how can I retrieve all added and modified elements (or corresponding id's) and change there associated parameters?
Kind regards,
Tim
PS: If desired, I can post/send/attach fragments of my code.
Solved! Go to Solution.