S
by SimoneM on 19 Mar 2024, edited 29 Mar 2024
#
Hi, for some time I've been developing automatisms in Python that create specific rules for me through ids files to be subsequently validated in Solibri. Doing some tests I was unable to make a specification work: I want only a list of parameters to be allowed within a specific pset, if there is one that is not allowed it must return the error.
until now I have set the specification like this via restriction in Regex, what am I doing wrong?

in the case shown in the image, even if a parameter named param_04 appears in that specific pset it does not return the error.
B
by Bimlooser on 28 Mar 2024
#
+2 votes
I might be wrong but maybe you should try something like this:
<xs:restriction base="xs:string">
<xs:enumeration value="Param01" />
<xs:enumeration value="Param02" />
<xs:enumeration value="Param03" />
</xs:restriction>
I cannot try to check 'cause i've issues with blender IfcTester maybe due to my experiments with files.
Hope it helps
S
by SimoneM on 29 Mar 2024
#
tried but it doesn't work, maybe because the requirement is satisfied for the other parameters present that are contained in the list.
thats how i created in python the series of enumerations in a loop:

the result:

I tried inserting parameters that were not in that list in the specified pset and I don't get the error with ids checker of Solibri :(
M
by Moult on 29 Mar 2024
#
+2 votes
Unfortunately that regex is likely not allowed in XML :( XML's regex patterns are pretty simple and lack these kind of negative lookahead patterns.
There's a really ugly hack you can do: [ALPQV][laueo][trnsol][egotu][zham]?[ze ]?
... and so on. I feel dirty for even suggesting it :)
S
by SimoneM on 29 Mar 2024
#
Got It , I'll settle for trying to control the number of parameters inside the pset, and check in another specification that there is the single parameter in that pset