Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

 

 

EXERCISE: kBridge Drawing                                                      

LAYOUT EXAMPLE

 

In this exercise we are going to build a kBridge Drawing for the Table project. It will provide us with 4 views, a border, and a title block.

 

Drawing1

 

EXERCISE: kBridge Drawing                                                        

kBridge Drawing

 

In the Edit Project Table, add the Drawing Utilities from the Available column to the Selected column and click OK.

 

Drawing2

EXERCISE: kBridge Drawing                                                        

Create a Title Block

 

 

 

Create a new design called TitleBlockMixin with these parameter rules:

 

Approved (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Checked (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Code (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Drawn (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

DwgNo (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Project (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Rev (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Scale (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Sheet (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

ShowTitleBlockInfo (Type:Boolean)
(Flags: cached,parameter)
(default: true)

 

Size (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

TextHeight (Type:Number)
(Flags: cached,parameter)
(default: ' ')

 

Title(Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Weight (Type:String)
(Flags: cached,parameter)
(default: ' ')

 

Drawing10

 

 

 

 

 

Mix TitleBlockMixin into MyTable (root).

 

Create the following designs with corresponding mixins:

MySheet (add DrawingSheet design as a mixin)

FrontViewport (add Viewport design as a mixin)

IsoViewport (add Viewport design as a mixin)

RightViewport (add Viewport design as a mixin)

TopViewport (add Viewport design as a mixin)

KBTitleBlock1 (add TitleBlockMixin (that you just created) as a mixin)

 

EXERCISE: kBridge Drawing                                                        

TREE STRUCTURE

Build the following tree structure from the designs created for the kBridge Drawing layout.

 

 

Drawing3

 

 

 

 

 

 

EXERCISE: kBridge Drawing                                                        

PARAMETERS FOR THE CHILD RULES

Supply the values to the following:

 

MySheet:

size: 'ANSI B'
viewScale:        0.025;

 

border: (child of MySheet)

length:        this.length
width:        this.width
sceneName:        this.sheetName

 

FrontViewport:

length:                      6
width:            4
position:              return {origin: p(-5, -1.25,0)};
showBorder:              true;
viewName:              return 'front';
viewScale:              return 0.05;

IsoViewport:

length:        6
width:        4
position:        return {origin: p(1.25, 3,0)};
showBorder:        true;
viewName:        return 'Iso';
viewScale:        return 0.025;

 

RightViewport:

length: 6
width: 4
position: return {origin: p(1.25, -1.25,0)};
showBorder: true;
viewName: return 'right';
viewScale: return 0.05;

 

TopViewport:

length: 6
width: 4
position: return {origin: p(-5, 3,0)};
showBorder: true;
viewName: return 'top';
viewScale: return 0.05;

 

KBTitleBlock1:

orientation: “vertical”
width: “full”
itemTitleLocation: “left”

 

 

EXERCISE: kBridge Drawing                                                        

View kBridge Drawing

 

Once MySheet is placed in the tree the model window will show a model button in the lower left hand corner.

In the model window, click on the model button and select sheet1.

 

 

Drawing4

 

Your kBridge Drawing will appear in the Model window. Notice the 4 views with a border.

 

Drawing5

 

At any time you can export this drawing by clicking on the PDF icon.

 

Drawing6

 

 

 

 

 

EXERCISE: kBridge Drawing                                                        

Adding Dimensions to the kBridge Drawing

 

Create the following designs with corresponding mixins:

LinearDimensionHeight (add LinearDimension design as a mixin)

LinearDimensionTop (add LinearDimension design as a mixin)

LinearDimensionHorizontal(add LinearDimension design as a mixin)

LinearDimensionVertical(add LinearDimension design as a mixin)

 

EXERCISE: kBridge Drawing                                                        

TREE STRUCTURE

Build the following tree structure from the designs just created.

 

Put (LinearDimensionHeight, LinearDimensionTop) into the FrontViewport design.

Put (LinearDimensionHorizontal, LinearDimensionVertical) into the TopViewport design.

 

Drawing7

 

EXERCISE: kBridge Drawing                                                        

PARAMETERS FOR THE CHILD RULES

Supply the values to the following:

 

LinearDimensionHeight:

dimType: 'vertical'
fromPoint: R.rootModel.TableTopGroup.TableTop0.vertexRFU
location: var NewLength=  R.rootModel.MySheet.FrontViewport.LinearDimensionTop.;
var x = NewLength*2.5/74;
return p(x,0,0) ;
toPoint: var legPairs = R.rootModel.NumberOfLegs;
if (legPairs == 2){
return R.rootModel.LegPairGroup.LegPair1.LegGroup.Leg0.vertexRFD;
}   else if(legPairs == 3){
  return R.rootModel.LegPairGroup.LegPair2.LegGroup.Leg0.vertexRFD;
}   else if(legPairs == 4){
  return R.rootModel.LegPairGroup.LegPair3.LegGroup.Leg0.vertexRFD;
}
show: true;
dimFormat: 'architectural';
//'architectural'
//'engineering'
//'decimal'

 

LinearDimensionTop:

dimType: 'horizontal'
fromPoint: R.rootModel.TableTopGroup.TableTop0.vertexLFU ;
location: return p(0,0.625,0);
toPoint: R.rootModel.TableTopGroup.TableTop0.vertexRFU
show: true;
dimFormat: 'architectural'

 

 

LinearDimensionHorizontal:

dimType: 'horizontal'
fromPoint: R.rootModel.TableTopGroup.TableTop0.vertexLBU;
location: p(0,1.5,0);
toPoint: R.rootModel.TableTopGroup.TableTop0.vertexRBU
show: true;
dimFormat: 'architectural'

 

LinearDimensionVertical:

dimType: 'vertical'
fromPoint: R.rootModel.TableTopGroup.TableTop0.vertexRBU
location: var NewLength= R.rootModel.MySheet.TopViewport.LinearDimensionHorizontal.dimScaledMeasurement;
var x = NewLength*2.5/74;
return p(x,0,0) ;
toPoint: R.rootModel.TableTopGroup.TableTop0.vertexRFU;
show: true;
dimFormat: 'architectural'

 

 

EXERCISE: kBridge Drawing                                                        

Vertex definitions

 

vertexLBD = Left Back Down
vertexLBU = Left Back Up
vertexLFD = Left Front Down
vertexLFU = Left Front Up
vertexRBD = Right Back Down
vertexRBU = Right Back Up
vertexRFD = Right Front Down
vertexRFU = Right Front Up

 

 

Drawing8

 

 

EXERCISE: kBridge Drawing                                                        

View newly added Linear Dimensions

 

You should now have dimensions in the Front and Top viewports.

 

Drawing9

 

 

 

 

 

 

EXERCISE: kBridge Drawing                                                        

Create the rectangles that will make up the Title Block

 

 

The title block can be created with lines or with rectangles.

In this case we will use rectangles and we will place our text within the rectangles.

 

 

Create the following designs with corresponding mixins:

BorderTitleBlock (add Rectangle design as a mixin)
BorderTitleBlockCorner (add Rectangle design as a mixin)
RecApproval (add Rectangle design as a mixin)
RecChecked (add Rectangle design as a mixin)
RecCode (add Rectangle design as a mixin)
RecDrawn (add Rectangle design as a mixin)
RecDwgNo (add Rectangle design as a mixin)
RecImage (add Rectangle design as a mixin)
RecProject (add Rectangle design as a mixin)
RecRev (add Rectangle design as a mixin)
RecScale (add Rectangle design as a mixin)
RecSheet (add Rectangle design as a mixin)
RecSize (add Rectangle design as a mixin)
RecTitle(add Rectangle design as a mixin)
RecWeight (add Rectangle design as a mixin)

 

 

EXERCISE: kBridge Drawing                                                        

PARAMETERS FOR THE CHILD RULES

Supply the values to the following:

 

BorderTitleBlock:

length: this.BorderLength;
width: this.BorderWidth;
renderNode: true;

 

BorderTitleBlockCorner:

length: 6;
width: 2
position: var x = this.BorderLength/2 - child.Length/2;
var y = this.BorderWidth/2 - child.Width/2;
return { origin: p(x, -y, 0, this.parent.transform ) };
renderNode:true;

 

 

RecApproval:

length: this.BorderTitleBlockCorner.length/3;
width: this.BorderTitleBlockCorner.width/9 * 1;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.BorderTitleBlockCorner.length/2 +
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecImage.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecChecked:

length: this.RecApproval.length;
width: this.RecApproval.width;
position: var x = this.RecApproval.Origin.x ;
var y = this.RecApproval.Origin.y - child.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecCode:

length: this.RecSize.length * 2;
width: this.RecSize.width;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecApproval.length/2+
      child.length;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecImage.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecDrawn:

length: this.RecApproval.length;
width: this.RecApproval.width;
position: var x = this.RecChecked.Origin.x ;
var y = this.RecChecked.Origin.y - child.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecDwgNo:

length: this.RecTitle.length/8 * 4;
width: this.RecCode.width;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecCode.length +
      this.RecSize.length +
      child.length;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecImage.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecImage:

length: this.BorderTitleBlockCorner.length/3;
width: this.BorderTitleBlockCorner.width/3 * 2;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.BorderTitleBlockCorner.length/2 +
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecProject:

length: this.BorderTitleBlockCorner.length/3*2;
width: this.BorderTitleBlockCorner.width/4 * 1;
position: var x = this.BorderTitleBlockCorner.Origin.x +
      this.BorderTitleBlockCorner.length/2 -
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecRev:

length: this.RecTitle.length/8;
width: this.RecDwgNo.width
position: var x = this.BorderTitleBlockCorner.Origin.x +
      this.BorderTitleBlockCorner.length/2 -
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecImage.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecScale:

length: this.RecTitle.length/8 * 3;
width: this.RecDrawn.width;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecApproval.length/2+
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y -
      this.BorderTitleBlockCorner.width/2 +
      child.width/2;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecSheet:

length: this.RecSize.length * 2;
width: this.RecWeight.width;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecApproval.length/2+
      this.RecWeight.length +
      child.length +
      child.length ;
var y = this.BorderTitleBlockCorner.Origin.y -
      this.BorderTitleBlockCorner.width/2 +
      child.width/2;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecSize:

length: this.RecTitle.length/8;
width: this.RecDrawn.width * 2;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecApproval.length/2+
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecImage.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecTitle:

length: this.BorderTitleBlockCorner.length/3*2;
width: this.RecImage.width- this.RecProject.width;
position: var x = this.BorderTitleBlockCorner.Origin.x +
      this.BorderTitleBlockCorner.length/2 -
      child.length/2;
var y = this.BorderTitleBlockCorner.Origin.y +
      this.BorderTitleBlockCorner.width/2 -
      child.width/2 -
      this.RecProject.width;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

RecWeight:

length: this.RecTitle.length/8 * 3;
width: this.RecScale.width;
position: var x = this.BorderTitleBlockCorner.Origin.x -
      this.RecApproval.length/2+
      child.length/2 +
      child.length ;
var y = this.BorderTitleBlockCorner.Origin.y -
      this.BorderTitleBlockCorner.width/2 +
      child.width/2;
return { origin: p(x, y, 0, this.parent.transform ) };
renderNode:true;

 

 

 

EXERCISE: kBridge Drawing                                                        

Add Text to each Rectangle

 

 

 

Drag a Text design from the BaseLibrary into each Rectangle. (Except the RecImage)

Example:

 

Drawing11

 

 

 

Supply the values to the following:

 

Rename from 'Text' to 'TextApproved'

TextApproved:

height:R.rootModel.TextHeight;        
text: 'APPROVED:'+ ' ' +R.rootModel.Approved;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

//Note: This position formula can work for each Text design that you make for the rectangles.

 

Rename from 'Text' to 'TextChecked'

TextChecked:

height:R.rootModel.TextHeight;        
text: 'CHECKED:'+ ' ' +R.rootModel.Checked;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextCode

TextCode:

height:R.rootModel.TextHeight;        
text: 'CODE:'+' ' + R.rootModel.Code;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextDrawn

TextDrawn:

height:R.rootModel.TextHeight;        
text: return 'DRAWN:'+' ' + R.rootModel.Drawn;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextDwgNo

TextDwgNo:

height:R.rootModel.TextHeight;        
text: return 'DwgNo:'+' ' + R.rootModel.DwgNo;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextProject

TextProject:

height:R.rootModel.TextHeight;        
text: return 'PROJECT:'+' ' + R.rootModel.Project;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextRev

TextRev:

height:R.rootModel.TextHeight;        
text: return 'REV:'+' ' + R.rootModel.Rev;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextScale

TextScale:

height:R.rootModel.TextHeight;        
text: return 'SCALE:'+' ' + R.rootModel.Scale;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextSheet

TextSheet:

height:R.rootModel.TextHeight;        
text: return 'SHEET:'+' ' + R.rootModel.Sheet;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextSize

TextSize:

height:R.rootModel.TextHeight;        
text: return 'SIZE:'+' ' + R.rootModel.Size;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextTitle

TextTitle:

height:R.rootModel.TextHeight;        
text: return 'TITLE:'+' ' + R.rootModel.Title;
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Rename from 'Text' to TextWeight

TextWeight:

height:R.rootModel.TextHeight;        
text: return 'WEIGHT:'+' ' + R.rootModel.weight+ ' lbs.';
position: var space = 0.0625;
var x = this.origin.x -
      this.length/2 +
      child.width/2 +
      space;
var y = this.origin.y;
return { origin: p(0 + x, 0 + y, 0, this.parent.transform ) };

 

Drag an Image design from the BaseLibrary into the RecImage.

 

Rename from 'Image' to 'ImageLogo'

'ImageLogo':

file:{ name: 'Example.jpg', id: '2e691ec6-cf04-4167-0ae5-08d81c0e201c' }        
length: return 1.25;
width: return 1.25;

 

The image must first be imported into the Resource folder in the Project tree. Jpg and png files are supported.

You can use your company logo image or find an image on the net to use.

 

While in the 'file' parameter rule, select the Get Reference check box, then select the image that you imported into the Resource folder.  The value will automatically fill in. Apply changes.

 

Drawing12

 

 

EXERCISE: kBridge Drawing                                                        

Add a User Interface

 

The

 

 

 

Create the following designs with corresponding mixins:

 

TableUI(add UIContainer design as a mixin)
RightContainer(add UIContainer design as a mixin)
RightPanel(add UIPanel design as a mixin)
RightFieldset(add UIFieldset design as a mixin)
UIGeometryViewer(add UIControlMixin and UIContainerMixin design as mixins)

 

Approved(add UITextInput design as a mixin)
Checked(add UITextInput design as a mixin)
Code(add UITextInput design as a mixin)
Drawn(add UITextInput design as a mixin)
DwgNo(add UITextInput design as a mixin)
Project(add UITextInput design as a mixin)
Rev(add UITextInput design as a mixin)
Scale(add UITextInput design as a mixin)
SheetUI(add UITextInput design as a mixin)
Size(add UITextInput design as a mixin)
TextHeight(add UITextInput design as a mixin)
Title(add UITextInput design as a mixin)

 

EXERCISE: kBridge Drawing                                                        

TREE STRUCTURE

Build the following tree structure from the designs created for the TableUI.

(LeftContainer is not needed for this exercise).

 

 

 

Drawing13

 

 

 

EXERCISE: kBridge Drawing                                                        

PARAMETERS FOR THE CHILD RULES

Supply the values to the following:

 

TableUI:

height: 'fill'
width: 'fill'

 

RightContainer:

visibility: return  R.rootModel.ShowTitleBlockInfo == true?'visible':'hidden'

 

RightPanel:

(No Values Needed): None        

 

RightFieldset:

orientation: 'vertical'

 

Approved:

bindParent: R.rootModel;
bindTarget: 'Approved'
title: 'Approved By:'

 

Checked:

bindParent: R.rootModel;
bindTarget: 'Checked'
title: 'Checked By:'

 

Code:

bindParent: R.rootModel;
bindTarget: 'Code'
title: 'Code:'

 

Drawn:

bindParent: R.rootModel;
bindTarget: 'Drawn'
title: 'Drawn By:'

 

DwgNo:

bindParent: R.rootModel;
bindTarget: 'DwgNo'
title: 'DwgNo:'

 

Project:

bindParent: R.rootModel;
bindTarget: 'Project'
title: 'Project:'

 

Rev:

bindParent: R.rootModel;
bindTarget: 'Rev'
title: 'Rev:'

 

Scale:

bindParent: R.rootModel;
bindTarget: 'Scale'
title: 'Scale:'

 

SheetUI:

bindParent: R.rootModel;
bindTarget: 'Sheet'
title: 'Sheet:'

 

Size:

Size: R.rootModel;
bindTarget: 'Size'
title: 'Size:'

 

TextHeight:

bindParent: R.rootModel;
bindTarget: 'TextHeight'
title: 'Text Height:'

 

Title:

bindParent: R.rootModel;
bindTarget: 'Title'
title: 'Title:'

 

 

EXERCISE: kBridge Drawing                                                        

View the Sheet drawing in the User Interface.

Supply your own values into each of the UITextInput boxes and view the results displayed in the Title Block:

 

 

Drawing14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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