ApplyParamAdvFiltersResult ApplyParamAdvFilters(OdId tObject, ApplyParamAdvFiltersArg tArg)
tObject. Moniker of opened repository object.
tArg. Operation execution parameters.
The ApplyParamAdvFilters operation applies advanced filters in object parameters before its opening.
Advanced filters are available if a repository dictionary is used as a parameter editor. Filters allow for limiting the parameters to choose from or setting up management of other parameters during opening repository object. To execute the operation, in the tObject field specify moniker of the repository object opened for view. The moniker can be obtained on executing the GetObjects operation. In the tArg field send the collection of parameters, on which dictionaries are based, and dictionary selections. Information about the parameters that use dictionaries can be obtained in results of the GetObjects operation in the mds.its.pars field. To open dictionaries, use the OpenDim operation, to work with elements and manage selection, use the GetDimElements, ChangeDimSelection operations. When the ApplyParamAdvFilters operation is being executed, dictionaries are rebuilt in parameters according to the specified settings of advanced filters.
The operation results in the logical true if advanced filters were applied successfully.
Final parameter selections can be sent to the corresponding Open* operation to open the object.
Below is the example of applying advanced filters in parameters of opened repository object. The request contains moniker of opened repository object and the collection of parameters. Monikers of dictionary selection, on which parameters are based, are also specified for parameters. The response contains whether advanced filters are successfully applied to parameters.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"ApplyParamAdvFilters" :
{
"tObject" :
{
"id" : "NMGCENDEBJJIGOAEMKHENDOHBOBLNGJEFIIEIMPLBOAHIDPB!M!9415"
},
"tArg" :
{
"dims" :
{
"it" :
[
{
"paramId" : "ITEM",
"selectionId" : "NMGCENDEBJJIGOAEMKHENDOHBOBLNGJEFIIEIMPLBOAHIDPB!M!S!SMNMGPAEEBJJIGOAEKMOAGHJLGPPLFDBEPLCIAAPHKOBCMDMM"
},
{
"paramId" : "ITEM1",
"selectionId" : "NMGCENDEBJJIGOAEMKHENDOHBOBLNGJEFIIEIMPLBOAHIDPB!M!S!SMFANJBEEBJJIGOAEILAOBMPAEONHPGOEIKEAICAAEPLEBPAN"
}
]
}
}
}
}
{
"ApplyParamAdvFiltersResult" :
{
"res" : "1"
}
}
public static ApplyParamAdvFiltersResult ApplyParamAdvFilters(MbId mb, string objectId, AFDimSelection[] paramsDimsSelection)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tApply = new ApplyParamAdvFilters()
{
tArg = new ApplyParamAdvFiltersArg()
{
dims = paramsDimsSelection
},
tObject = new OdId() { id = mb.id + "!" + PP7SOMSampleClass.FindObjectById(mb, objectId).k }
};
// Apply advanced filters in object parameters
var result = somClient.ApplyParamAdvFilters(tApply);
return result;
}
See also: