Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

Description

PaperSizeMixin is a mixin containing rules that can be used by other designs.

We do not use it alone; instead, it is used to add the rules to other designs. Presently there are 1 UI design that use this mixin (see below).

 

Parameter Rules and Non-Parameter Rules

 

PaperSize: Enter the string value for the paper size.
Example:'Letter (8.50 x 11.00 Inches)';

 

PossiblePaperSizes:
Formula:var i;
var out = [];
var n = "";
var l = 0.0;
var w = 0.0;
var text = "";
for(i=0;i<this.StandardPaperSizes.length;i++){
   n = this.StandardPaperSizes[i][0];
   l = this.StandardPaperSizes[i][1];
   w = this.StandardPaperSizes[i][2];
   text = n + " (" + l.toFixed(2) + " x " + w.toFixed(2) + " Inches)";
   out.push({width:w,height:l,text:text});
   text = n + " (" + w.toFixed(2) + " x " + l.toFixed(2) + " Inches)";
   out.push({width:l,height:w,text:text});
   }
return out;

 

StandardPaperSizes:
Formula:[["Letter",8.5,11.0],
["Legal",8.5,14.0],
["ANSI A",8.5,11.0],
["ANSI B",11.0,17.0],
["ANSI C",17.0,22.0],
["ANSI D",22.0,34.0],
["ANSI E",34.0,44.0]]

 

getHeightFromName:
Formula:return function(paperSizeName) {
   var i;
   var testName;
   var height = 1.0;
   for (i=0;i<this.PossiblePaperSizes.length;i++) {
       testName = this.PossiblePaperSizes[i].text;
       if (testName===paperSizeName) {
           height=this.PossiblePaperSizes[i].height;
           }
       }  
   return height;
};

 

getWidthFromName: x
Formula:return function(paperSizeName) {
   var i;
   var testName;
   var width = 1.0;
   for (i=0;i<this.PossiblePaperSizes.length;i++) {
       testName = this.PossiblePaperSizes[i].text;
       if (testName===paperSizeName) {
           width=this.PossiblePaperSizes[i].width;
       }
   }
   return width;
};

 

 

Mixins

None

 

RULE NAME

TYPE

DEFAULTS

CATEGORY

FLAGS

PaperSize

string

'Letter (8.50 x 11.00 Inches)'

Inputs

Cached
Parameter

PossiblePaperSizes

array

Formula

Inputs

Cached

StandardPaperSizes

array

Formula

Inputs

Cached

getHeightFromName

any

Formula


Cached

getWidthFromName

any

Formula


Cached

 

 

kBridgeExampleIcon

 

 

UI Designs that use the DimensionTextMixin:

1.DrawingSheetMixin

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