private void _toggleAllowRequestForContainers( bool Allow ) { CswNbtView MyContainers = new CswNbtView( _CswNbtResources ); MyContainers.ViewName = "Related Containers"; CswNbtMetaDataObjectClass ContainerOC = _CswNbtResources.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); CswNbtMetaDataObjectClassProp MaterialOCP = ContainerOC.getObjectClassProp( CswNbtObjClassContainer.PropertyName.Material ); CswNbtViewRelationship Root = MyContainers.AddViewRelationship( ContainerOC, false ); MyContainers.AddViewPropertyAndFilter( Root, MaterialOCP, NodeId.PrimaryKey.ToString(), CswEnumNbtSubFieldName.NodeID ); ICswNbtTree ContainersTree = _CswNbtResources.Trees.getTreeFromView( MyContainers, false, false, false ); for( int i = 0; i < ContainersTree.getChildNodeCount(); i++ ) { ContainersTree.goToNthChild( i ); CswNbtObjClassContainer CurrentContainer = ContainersTree.getNodeForCurrentPosition(); CurrentContainer.ToggleAllowRequest( Allow ); CurrentContainer.postChanges( false ); } }//_toggleAllowRequestForContainers()