yujie
November 17, 2025, 9:35am
1
Hi Forum,
Does anyone know how to create a vcCombinationProductFilter with a series of ExpressionFilters (vcProductFilter ) using the Python API?
I can access these filters if I create them through the UI first, but I don’t know how to start from scratch.
Tilma
November 17, 2025, 10:43am
2
Hello,
you will need to use the filter constants :
So first you want to set your combination filter with .setFilter :
combiFilter = statement.setFilter(VC_FILTER_COMBINATION)
then you can insert filters in this filter using these combination operation constants:
with .insertFilter( index, filterType, operation) :
productFilter = combiFilter.insertFilter(-1,VC_FILTER_CONFIGURABLEPRODUCTTYPE, VC_FILTEROPERATION_AND)
propertyFilter = combiFilter.insertFilter(-1,VC_FILTER_PRODUCTPROPERTY, VC_FILTEROPERATION_OR)
you can then define your filters according to the type
1 Like
yujie
November 17, 2025, 11:15am
3
Thanks, Tilma — It works, thank you very much!
I was trying to figure out where the setFilter method is supposed to be used, but I got completely lost. XD
May I ask: What does vcProductFilterStatement inherit from, and where can we obtain an object of this type?
Tilma
November 17, 2025, 12:28pm
4
I think all statements which have a filter are vcProductFilterStatement (TransportIn, StartTransportIn, ReserveProduct, Buffer, GetProducts, …) and all other statements are just vcStatements
1 Like