Drawing_Border

Description: This function draws a border around the edges of the drawing. The boarder line is indented from the edges by 15 pixels. Within that border are zone markers. The horizontal markers are, from left to right, "8" to "1". The vertical markers are, from bottom to top, "A" to "D". The zone are generally used on multi-page drawings to designate the source and destination for signals common to each page.For example, if a signal input is annotated with "3B2" the signals source is located on Page 3, in Zone B2.

If you use the "Show Zones" option in the instantiation of the border, dashed lines will be drawn that delimits the vertical and horizontal zone markers. Try this simple dropdown menu to see how it appears on the sample drawing page.

Return: Returns the X and Y coordinates (Lib_S_Label_X, Lib_S_Label_Y) of the lower right corner of the boarder. You can call those variables anything you want but their intent is for positioning the Label. If you are not using a label, the return values can be ignored.

var Lib_S_Label_X, Lib_S_Label_Y; var Label_XY = new Array();
Label_XY = Drawing_Border( Lib_S_Dwg_Obj, "", Width, Height );
Lib_S_Label_X = Label_XY[0]; Lib_S_Label_Y = Label_XY[1];
Drawing_Label

Description: In this function, Lib_S_Label_X, Lib_S_Label_Y describe the bottom-right position for the drawing label. Those values can also be returned by the Drawing_Border function. If you are not using the Drawing_Border function, you will need to specify the Lib_S_Label_X, Lib_S_Label_Y.

The information for the Drawing_Label is an array of data (Lib_S_Label_Info) in a specific order. The order is: Manufacturer (Lib_S_Mfgr), Drawing Title (Lib_S_Title), Drawing Size (Lib_S_Size), Drawing Number (Lib_S_Doc_Num), Drawing Revision (Lib_S_Rev), Drawing Date (Lib_S_Date), Drawing Sheet Number (Lib_S_Sheet), and Total Number of Sheets (Lib_S_Pages). Below is an example of the array and the information.

Parameter Description
Lib_S_Dwg_Obj jsGraphics Object that points to the drawing.
Lib_S_Mfgr Manufacturer Name ("Electronic Rainbow Ind., Inc.", etc.) in quotes.
Use "" for no manufacturer.
Lib_S_Title Text label ("INDUCTANCE METER", etc.) in quotes. Use "" for no title.
Lib_S_Size Document Size ("A", "B", etc.) in quotes. Use "" for no size.
Lib_S_Doc_Num Document Number ("123-456-789", etc.) in quotes. Use "" for no number.
Lib_S_Rev Document Revision ("A", "B", etc.) in quotes. Use "" for no revision.
Lib_S_Date Document Date ("Aug 28, 2016", etc.) in quotes. Use "" for no date.
Lib_S_Sheet Document Sheet Number ("1", "2", etc.) in quotes. Use "" for no sheet number.
Lib_S_Pages Document Total Pages ("1", "2", etc.) in quotes. Use "" for no sheet reference.
Lib_S_Width Drawing Width, in Pixels.
Lib_S_Height Drawing Height, in Pixels

Usage: The sample subroutine call is shown below. The sample first draws a Border and then uses the return values from the Border to position the Label. The values from the select boxes above modify the sample subroutine call directly to show how a call might be constructed. When placed in the proper drawing function, as shown at the top of this document, the Width and Height are extracted from the drawing instance (see the section on JavaScript Drawing Function). The name of the jsGraphics Object also comes from the JavaScript Drawing Function function.

var Lib_S_Label_X, Lib_S_Label_Y; var Label_XY = new Array();
Label_XY = Drawing_Border( Sch, "", Width, Height );
Lib_S_Label_X = Label_XY[0]; Lib_S_Label_Y = Label_XY[1];
Lib_S_Label_Info = [ "", "", "", "", "", "", "", "" ];
Drawing_Label( Sch, Lib_S_Label_Info, Lib_S_Label_X, Lib_S_Label_Y );