Let's talk about the InternalDefinition.SetAllowVaryBetweenGroups() method one more time.
The odd point is that it needs a document argument:
public ICollection<ElementId> SetAllowVaryBetweenGroups(
Document document,
bool allowVaryBetweenGroups
)
However, the VariesAcrossGroups property is not document indexed but returns the flag directly:
public bool VariesAcrossGroups { get; }
We also wonder how InternalDefinition could operate on different documents.
Project parameter definitions can only be got from the Document.ParameterBindings property, we believe. So each InternalDefinition and its corresponding Binding instance are document related. Though they do not have the Document property as the Element instance does, they should reside in a particular document rather than in Revit application.
Not sure what will happen if the document argument passed to the SetAllowVaryBetweenGroups() method is different from the one retrieving the BindingMap. Let's do an experiment and see next...
Revit Parameter Organizer has been refining to address this kind of matters ...
Recent Comments