Community
Is it possible to 'Anchor' section lines to elements so that when the elements are moved / rotated within a project RVT their sections remain correct?
Thanks
Solved! Go to Solution.
Hello
The sample does work nicely in a session of Revit. The problem I get is that when I close and reopen Revit it loses the Section / Window associations.
How can I get the sample to register with Revit on startup? I have tried a hack as shown below:
public Result OnStartup(UIControlledApplication a) { m_sectionUpdater = new SectionUpdater(m_thisAppId); m_sectionUpdater.Register(m_document); // Register the updater in the singleton // UpdateRegistry class UpdaterRegistry.RegisterUpdater(m_sectionUpdater); // Set the filter; in this case we // shall work with beams specifically ElementCategoryFilter filter = new ElementCategoryFilter( BuiltInCategory.OST_Windows); // Add trigger BENS NOTE, I AM NOT SURE HOW TO GET THIS TO WORK - OR IF IT IS NECESSARY! UpdaterRegistry.AddTrigger( m_sectionUpdater.GetUpdaterId(), filter, Element.GetChangeTypeGeometry()); // m_sectionUpdater.AddTriggerForUpdater(m_document, idsToWatch, sectionId, sectionElement); return Result.Succeeded; }
Above is the error message that I receive. Revit doesn't remember which section lines are anchored to which windows...