powered by CADENAS

Manual

Manual

2.2.1.2.  What are categories?

Category is the name for a unique rule (condition).

Via categories blocks and keys can be specified.

While using a block or key, one checks whether the rule is fulfilled. Only then is the block or key used.

In block and key the category is applied through use of the rounded parenthesis in the name (ex. "is2d", "is3dAsm"). During runtime those blocks and keys are evaluated whose categories are valid.

If more than one category is stated (separated by comma), then they must all be valid.

If multiple keys are valid, then the one with the most conditions is taken.

When stringing keys with categories together a complex set of rules can be made.

General form:

FileName=?“Standard/Default“
FileName(isPlant())=?“Flower“
FileName(isAnimal(),isTall())=?“Giraffe“
FileName(isAnimal())=?“Dog“

Example for using a category at key level:

DocBeforeSave(is3dasm)=GetObject("iface.defaultcadcallback").AsmBeforeSave
DocBeforeSave(is3dpart)=GetObject("iface.defaultcadcallback").PartBeforeSave

Example for using a category at block level:

[CreationOptions(is2d)]