DMU not triggered by changes to Viewport parameters

DMU not triggered by changes to Viewport parameters

nicholasrawlingsC4QY3
Explorer Explorer
227 Views
3 Replies
Message 1 of 4

DMU not triggered by changes to Viewport parameters

nicholasrawlingsC4QY3
Explorer
Explorer

I'm working on a dynamic model updater that reacts to changes in a viewport's displayed title. If I listen for changes to any of the relevant parameters on the viewport, the updater is not triggered:

var filter = new ElementCategoryFilter(BuiltInCategory.OST_Viewports);
UpdaterRegistry.AddTrigger(updaterId, filter, Element.GetChangeTypeParameter(new ElementId(BuiltInParameter.VIEW_NAME)));
UpdaterRegistry.AddTrigger(updaterId, filter, Element.GetChangeTypeParameter(new ElementId(BuiltInParameter.VIEW_DESCRIPTION)));
UpdaterRegistry.AddTrigger(updaterId, filter, Element.GetChangeTypeParameter(new ElementId(BuiltInParameter.VIEWPORT_VIEW_NAME)));

However, if I listen for changes to the name and description parameters on the view, the updater is triggered as expected:

var filter = new ElementCategoryFilter(BuiltInCategory.OST_Views);
UpdaterRegistry.AddTrigger(updaterId, filter, Element.GetChangeTypeParameter(new ElementId(BuiltInParameter.VIEW_NAME)));
UpdaterRegistry.AddTrigger(updaterId, filter, Element.GetChangeTypeParameter(new ElementId(BuiltInParameter.VIEW_DESCRIPTION)));

 Is this the expected behavior? I'm on Revit 2022.

0 Likes
228 Views
3 Replies
Replies (3)
Message 2 of 4

moturi.magati.george
Autodesk
Autodesk

Hi @nicholasrawlingsC4QY3 

Our teams only support 3 previous versions of Revit and unfortunately Revit 2022 is not supported https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Which-are-the-offi...

Kindly upgrade your instance and try again

  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes
Message 3 of 4

ctm_mka
Collaborator
Collaborator

@moturi.magati.george not helpful, we often don't have choice in the version(ex. i still have an active project, under construction, in 2021, design team felt it unnecessary to upgrade until after the project is done, less painful that way).

@nicholasrawlingsC4QY3 somewhat expected behavior, yes. A viewport is to some degree a child of the view, (and does not exist without a sheet!), it inherits certain properties, like "Title on sheet" from the view.

Message 4 of 4

nicholasrawlingsC4QY3
Explorer
Explorer

I got access to Revit 2024 this morning. It exhibits the same behavior.

 

A test case is available here: https://gist.github.com/coditect/c9f31a1fd9a8c7ec896e2fbeba6981f5

0 Likes