Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

Navigation: Concepts

Children/Child Groups

Scroll Prev Top Next More

 

We have previously talked about Child Rule and Children and Parameters in general terms. Now, we will dive into Children and Child groups in more detail.

First, when we use a Child Rule to create Children, a Child group object is created in the model tree. This is a special object and is different from the other nodes of the model tree, its Design is controlled by the system, and it has no parameters of its own.  It can be thought of as a physical representation of the Child Rule.

Parameter formulas, which appear in Child Rules, are evaluated as if they are rules in the Design containing the child rule.  In parameter formulas, "this" is the object containing the child rule, not the group nor the actual resulting child. See more details in the section on reference chains.

Concepts-ChildParameterGrid

NOTE: All Children have a Rule called index, which indicates which Child it is. The index of the first Child is 0, the second Child index is 1, and so on. Indexing is done automatically. Note that indexes are unique only under a given group, and are automatically assigned.

The Child Rule contains several components:    

Name

This is the name of the Child group. Note that it is not the name of the Design or Designs that will be used to make the Child. That is because this name is used in reference chains and we don’t want it to change depending on the actual type of Child. For example, a table leg is a leg no matter if it is made from a RoundLeg Design or a SquareLeg Design. We want to refer to it as leg in either case.

The name must be a legal kBridge name and cannot contain special characters or spaces. It is used internally in the execution of the Rules.

Child Name

Child Name is an expression that gets evaluated once for each child that returns the name to be assigned to the Child. The expression would normally use Child.index in the expression. By default, the Child Name is the <Name><child.index> for each Child.

Design

This is an expression that gets evaluated once for each child, and returns the name of the Design to be used for the Child. Note that the expression can be a conditional and thus return different Designs for different situations. Also, it can have Child.index in it and so can even have different Designs for each individual Child created by this Child group.

Quantity

This is an expression that returns an integer number of Children. This expression also controls the configuration since it can set the number of Children differently based on the mathematical calculations or conditional statements in the expression.

Parameters

For each Parameter, if there is a Supplied formula, then that formula will override the default formula for that Rule in the Child. If no formula is supplied, then the default will be used.

Name:  The name of the Parameter Rule from the Child

Datatype:  The datatype as received from the Child

Supplied:   This is the new formula to be provided to the Child. Remember, it is evaluated in the context of the parent, not the Child.

Default:  This is the default formula provided by the Child. It is overridden by Supplied if provided. It is evaluated in the context of the Child.

NOTE: One of the most common errors is to assume the supplied formula is evaluated in the context of the child.  But supplied formulas are supplied before the child is created, written as a Child Rule on the parent. Thus, "this.length" when supplied is very different from "this.length" as a default formula.

 

However, supplied formulas are evaluated after the child is created, and do have access to all of the rules on the child, by the virtue of having the special variable "child" available during evaluation.  Thus they can use the child.<rulename> syntax.

Knowledge Bridge from Engingeering Intent is a full-featured engineering and sales automation environment