About Knowledgeware Integration

This topic provides information on integration with Engineering Rules Capture. With this integration you can perform basic query-based operations using Enterprise Knowledge Language.

See Engineering Rules Capture User's Guide: Creating an Action.

This page discusses:

Color and Transparency

You can check if a 3D shape representation inherits color and transparency attributes.

Enter a query such as the following:

let visu (Visualizable)
visu = PartBody\Extrude.1
Message ("IsColorInherited=",visu.IsColorInherited)
Message ("IsTransparencyInherited=", visu.IsTransparencyInherited)

When you run the action, an Information dialog box appears. It returns Yes or No, depending on whether or not the color and transparency are inherited.

Axis Systems

You can know the position of the origin and the coordinates of the three axes. You can also check if the selected axis system is set as current.

To locate the origin, enter a query such as the following:

Let Vector1 (Vector)
set Vector1 = `Axis System.1` .Origin
Message ("Vector dim=", Vector1.NbCol, " ", Vector1.NbLine)
Message ("Vector coord=", Vector1.Get(1,1), " ", Vector1.Get(1,2)," ",Vector1.Get(1,3)) 

To know the x, y, and z coordinates of the axis system, enter a query such as the following:

Let Matrix1 (Matrix)
set Matrix1 = `Axis System.1` .Axes
Message ("Matrix dim=", Matrix1.NbCol, " ", Matrix1.NbLine)
Message ("Matrix line 1=",Matrix1.Get(1,1), " ",Matrix1.Get(1,2)," ",Matrix1.Get(1,3))
Message ("Matrix line 2=",Matrix1.Get(2,1), " ",Matrix1.Get(2,2)," ",Matrix1.Get(2,3))
Message ("Matrix line 3=",Matrix1.Get(3,1), " ",Matrix1.Get(3,2)," ",Matrix1.Get(3,3))

When you run the action, an Information dialog box appears. It displays the coordinates of the axis system in matrix form. A negative coordinate indicates the reversal of the axis.

To check if the selected axis system is current, enter a query such as the following:

`Axis System.1` .IsCurrent = true
Message ("Is current 1 =", `Axis System.1` .IsCurrent)
`Axis System.1` .IsCurrent = false

When you run the action, an Information dialog box appears. If the selected axis system is current, the dialog box returns true, else it returns false.

Main Body

You can check if a 3D shape representation is the main body. By default, PartBody is the main body.

To check if the selected body is the main body, enter a query such as the following:

Let Part1 (PartFeature)
set Part1= ` Representation553668929 --- IN_WORK` 
if (Part1.MainBody<>PartBody) 
	Message ("Error")

When you run the action, an Information dialog box appears. It displays an error message if the selected 3D shape is not the main body.

Isolated External References

You can find the isolated external references of a 3D shape representation, if any.

To check for isolated external references, enter a query such as the following:

Let Part1 (PartFeature)
set Part1= ` Representation553668929 --- IN_WORK` 
Message ("IsolatedExternalReferences", Part1.GetAttributeObject ("IsolatedExternalReferences")) 

Boolean Operations and Polarity

You can know if a body is involved in a Boolean operation. You can also know what is the polarity of a body.

To locate the origin, enter a query such as the following:

let body(BodyFeature)
if (PartBody.Polarity <> "Remove")
	Message("PartBody.Polarity=",PartBody.Polarity)
if (PartBody.BooleanOperation <> false)
	Message("PartBody.BooleanOperation=",PartBody.BooleanOperation)

set body=PartBody\Remove.2\Body.3
if (body.Polarity <> "Add")
	Message("body.Polarity=",body.Polarity)
if (body.BooleanOperation <> true)
	Message("body.BooleanOperation=",body.BooleanOperation)

When you run the action, an Information dialog box appears. It displays the polarity of the selected body. For a positive polarity the dialog box prompts Add, and for negative, Remove.