Hello All,
I'd like to know grammars or OPIM configuation, For example, && is AND, what is OR? And does it support complicated grammars? Thanks a lot!
INCLUDE = EC_CLASS=.*VALVE.* && SIZE1 > 200
Hello Changsong Ling,
Thank you for your question. I will try to find out all about syntax which can be used in OPIM configuration files and will answer you here.Regards,Kestutis Mitkus
Best Regards,Kestutis Mitkus
Application Engineer, Building, Structural & Plant
Hello Changsong,Can you please look on below Wiki Article, there are others operators meaning as well.
Hi Changsong,
The OR is sort of implemented using multiple include rules. Suppose I want to INCLUDE items with property COLOR having values red OR blue one could use 2 include statements
All the include lines are parsed and if any rule is passed the component of interest is included. In case you do not have the option to use multiple INCLUDE statements (like for user labels) you can concatenate them using a semicolon
INCLUDE = COLOR=RED;COLOR=BLUE
A little bit more complicated example combing AND and OR:
INCLUDE = COLOR=RED && WEIGHT>100;COLOR=BLUE;COLOR=WHITE
is equivalent to:
or
(COLOR=RED AND WEIGHT>100) OR (COLOR=BLUE) OR (COLOR=WHITE)
Another option to explore is using regular expression syntax where needed. So for instance to include items that are RED, BLUE or WHITE you could also use:
INCLUDE=COLOR=(RED|BLUE|WHITE)
Regards,
Frank
Answer Verified By: Changsong Ling
Hi Frank,
Is it safe to assume the regex version supported by OPIM is the same version used in the Find/Replace text tool? And the same regex version used for SS and CE release?
Best regards,
Tuan Le
Found this comment from 2 years ago, does this apply to current version of OpenPlant suite as well?
https://communities.bentley.com/products/microstation/f/microstation-forum/125147/connect-text-search-regular-expressions/380963#380963