Hi.About spectype in ruleset. #769
-
Hi, I'm using ruleset to meet my needs. If I use spectype: conte ntSpecificationTypes.ContentRelatedInstances It's like I chose conte ntSpecificationTypes.ContentRelatedInstances Type, only its related definitions can be used. Is my understanding correct? The three properties of acceptablepolymerally, acceptableclassnames and acceptableschemaname belong to context ntSpecificationTypes.SelectedNodeInstances , but does not belong to conte ntSpecificationTypes.ContentRelatedInstances I used it in this way, but didn't report it wrong. Although it doesn't work, is it my understanding?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, There are two ways to define presentation rules:
Either way, if you have error / type checking disabled, there's nothing that prevents you from specifying excessive attributes to any rule - they're simply ignored. I see in your example you're defining the rules in TS. To enable type checking, specify the type of object you're creating: import { Ruleset } from "@bentley/presentation-common";
const rules: Ruleset = {
// ...
}; |
Beta Was this translation helpful? Give feedback.
Hi,
There are two ways to define presentation rules:
.json
file. In this case error and type checking are done by your editor, assuming that you have specified the$schema
attribute pointing to@bentley/imodeljs-common/Ruleset.schema.json
.Either way, if you have error / type checking disabled, there's nothing that prevents you from specifying excessive attributes to any rule - they're simply ignored.
I see in your example you're defining the rules in TS. To enable type checking, specify the type of object you're creating: