GDL Web Control Programming Reference
Common <EMBED> Tag Attributes
This attribute defines how the plug-in is positioned on the page.Specifies the size, in pixels, of the border around the plug-in.
"NO" specifies that the frame has no border.
The height of the area the browser will reserve for the embedded program. You can supply the height in pixels or as a percentage of total screen height.
This attribute determines whether the plug-in is visible on the page. Possible values are TRUE and FALSE. TRUE overrides any HEIGHT and WIDTH to make a zero-sized plug-in. The default is FALSE.
Sets the amount of space, in pixels, that the browser should keep free on the left and right sides of the plug-in.
This URL will be published by the Plug-in during downloading. With this URL, the user can later browse for additional information or an updated version of a library part, or download other library parts.
Sets the name of the plug-in.
Specifies the URL that contains the instructions for installing the plug-in. This URL is used by the assisted installation process, if the plug-in registered for the MIME type of this EMBED element is not found.
This is a URL that points to a JAVA archive that is to be used if the plug-in is not installed, and the user requests to install the plug-in.
Specifies the data that the plug-in must use. The type of plug-in is determined by the extension, if no value is specified with the TYPE attribute
Specifies the MIME type of the EMBED element, which in turn determines which plug-in to load. In our case it is very useful to specify it to any GDL object. e.g., type="model/vnd.gs-gdl". Without this, the server may not recognize that the file should be sent by this MIME type protocol via the Internet and therefore the Netscape browser (which recognizes files by MIME type, unlike Internet Explorer) doesn't call GDL Object Web Control.
This attribute sets in which units the value of the HEIGHT and WIDTH attributes are supplied. Possible values are pixels or en which is half the point size.
Specifies a margin, in pixels, between the top and bottom edges of the applet and any surrounding text and images.
Specifies the width in which the plug-in must fit. The plug-in is scaled to fit the specified height and width. You can supply the width in pixels or as a percentage of total screen width.
Common <OBJECT> Tag Attributes
specifies the alignment for the control:LEFT aligns text flush left (the default).
RIGHT aligns text flush right.
TOP aligns text to the top.
BOTTOM aligns text to the bottom.
CLASSID="CLSID:59AB211E-AD5C-11D3-8326-00C0CA175B90"
is the directory containing the object class file and any resources needed by the object. The value is a URL for an absolute or a relative pathname. An absolute URL is used as is, without modification, and is not affected by the document's BASE tag. A relative CODEBASE attribute is relative to the document's base URL defined by the BASE tag. If the document does not define a BASE tag, it is relative to the directory containing the HTML file. For OBJECT tags that are treated as plug-ins, CODEBASE is synonymous with the PLUGINSPAGE attribute of the EMBED tag.
is the URL of the object's data.
specifies the height of the area to be occupied by the control.
specifies the MIME type of the embedded object.
specifies the width of the area to be occupied by the control.
is the name that JavaScript can use to refer to the object; this is equivalent to the NAME attribute of the APPLET and EMBED tags.
GDL Object Web Control Attributes
Antialiasing="1"Usage of anti-aliasing. The possible values are:
1 Off
2 Good
3 Better
4 Best
AxonometryAngle="270"
When the ProjectionCode parameter is not perspective projection (10), the scene will be rendered in parallel projection mode using the ProjectionCode parameter. In any parallel rendering mode (e.g., Front view and Isometric) this parameter value will rotate the camera around the object. The default value is 270 degrees.
BackImage="document name" (available from version 1.02)
This parameter allows you to define the document name of the image file that will be displayed in the background of the 2D drawing, 3D and photorendered images. It will not appear with the Preview picture. The URL of the background image file must be defined in the GDLListTxt catalog file.
DisableMenus=#0
When the user presses the right button of the mouse (Windows) or clicks + Ctrl (MacOS), a pop-up menu appears. The HTML programmer can permit or ban the use of some menu items. The parameter is a hexadecimal number. The 1 value of the i. bit of the parameter means the i. menu item is disabled. (0 means no menu items disabled, 1 means the first menu item is disabled, ... etc. The #2000 value will disable the 14th menu item. When counting the menu items, take into account that the separators are also considered menu items.)
EarthColor="#FFFFFF"
In photorendering mode, the color of the earth, which will appear in the background. The default value is "#FFFFFF", which means the red, green, blue component of the color is the hexadecimal values of FF, FF, FF.
Effects="1+64"
The special effects of the 3D Visualization. The default value combination is 65. Possible values:
1 Sun is on.
2 Lights are on.
4 Turns on the sun shadow in the Photorendering.
8 Turns on the light's shadow in the Photorendering.
16 Turns the high accuracy in the shadow mapped Photorendering. It is effective if the 1 and 4 values are set.
32 Turns on vectorial sun shadow casting. It is effective only in WireFrame, Hidden Line and Shading modes.
64 Turns on vectorial hatching in Shading and Hidden Line modes.
128 Turns on the contours in the shaded view.
GdllistTxt=""
The URL address of the gdllist.txt file. This file can be created in two ways: automatically by GDL Object Publisher authoring tool, or manually. For the format of this file see gdllist.txt format. If this parameter is not specified, GDL Object Web Control will search for the gdllist.txt in the folder the object was loaded from. If this string is a relative path, it must be relative to the library part file and not to the HTML page.
LengthUnitFormat="3"
The following nine length units are available (the default value is 3):
1 mm
2 cm
3 m
4 km
5 decimal feet
6 feet & decimal inches
7 decimal inches
8 feet & fractional inches
9 fractional inches
LengthDecimals="2"
The accuracy of the decimal display. The default value is 2.
LengthRoundInch="32"
The number of fractions displayed. The following values are available:
1 1
2 1/2
4 1/4
8 1/8
16 1/16
32 1/32
MasterGdl=""
The URL address of the Master.gdl file. This file contains the default materials, textures, etc., for the object files. By default, GDL Object Web Control will search for this file in the folder the object was loaded from or the folder the gdllist.txt file was loaded from. If this string is a relative path, it must be relative to the library part file and not to the HTML page.
Method="2"
The painting method in shading mode. The possible values are:
0 Flat shading
1 Best
2 Final
4 Better
PerspectiveEyeCone="60"
The angle of the camera view frustum. This parameter takes effect only in perspective rendering mode, when the ProjectionSettings parameter is 10, or when the user changes the rendering mode to perspective in the Projection Settings dialog box. The default value of this parameter is 60 degrees.
PerspectiveObjectPointX="0.0"
PerspectiveObjectPointY="-0.5"
PerspectiveObjectPointZ="0.6"
The camera will focus to this point. It is somewhere near the object. These parameters take effect only in perspective rendering mode, when the ProjectionSettings parameter is 10, or when the user changes the rendering mode to perspective in the Projection Settings dialog box. The default values of this parameter are 0.0, 2.5, 1.5.
PerspectiveViewPointX="2.5"
PerspectiveViewPointY="2.5"
PerspectiveViewPointZ="1.5"
The location of the camera. These parameters take effect only in perspective rendering mode, when the ProjectionSettings parameter is 10, or when the user changes the rendering mode to perspective in the Projection Settings dialog box. The default values of this parameter are 0.0, 2.5, 1.5.
ProjectionCode="7"
The projection type. All projections are parallel views, except for 10. The possible values are:
0 Front view
1 Back view
2 Over view
3 Top view
4 Left view
5 Right view
6 Frontal axonometry
7 Isometric axonometry
8 Monometric axonometry
9 Dimetric axonometry
10 Perspective projection
11 Bottom axonometry
12 Frontal bottom axonometry
13 Isometric bottom axonometry
14 Monometric bottom axonometry
15 Dimetric bottom axonometry
Save="YES" | "NO"
The YES state of this tag attribute prompts the GDL Object Web Control to save the GDL object identified in the SRC parameter. In this case, no drawing is performed onto the browser window, a Save As... dialog box appears instead. If the object named in SRC has references to other files (e.g., macros), the necessary files will also be saved. The default value of this parameter is NO.
ShowType="SHADING"
This parameter tell the GDL Object Web Control which drawing type it should use. The default value is SHADING. Possible values are:
WIREFRAME Draw the object in wireframe, show all lines
HIDDENLINE Draw the object in wireframe, hide invisible lines
SHADING Fill the object with color
PHOTORENDERING Paint a photorealistic picture of the object
DRAWING2D Draw the object in 2 dimension
PREVIEW Draw a preview picture of the object. No rendering is performed
Similar="YES" | "NO"
When this parameter is YES, the GDL Object Web Control will search for the other instances that are showing the same Library Part. It will use the same parameters for each similar instances. When the user makes some parameter changes it will update automatically in each window or tag.
SkyColor="#FFFFFF"
In photorendering mode, this indicates the color of the sky that will appear in the background. The default value is "#FFFFFF", which means that the red, green and blue components of the color are the hexadecimal values of FF, FF, FF.
If these parameters are not present, the width and height of the picture will equal with the WIDTH, HEIGHT parameters of the <EMBED> tag. If present, they will override these values in the context of the GDL Object Web Control. In this case, the size of the empty window that Netscape leave for the GDL Object Web Control is determined by WIDTH, HEIGHT, but the GDL Object Web Control uses just the WinWidth, WinHeight part of that space. You can supply the size in pixels or as a percentage of total screen size.
If these parameters are not present, the width and height of the picture will equal with the WIDTH, HEIGHT parameters of the <EMBED> tag. If present, they will override these values in the context of the GDL Object Web Control. In this case, the size of the empty window that Netscape leave for the GDL Object Web Control is determined by WIDTH, HEIGHT, but the GDL Object Web Control uses just the WinWidth, WinHeight part of that space. You can supply the size in pixels or as a percentage of total screen size.
"SetPluginCode"
Sets the code file's url for enabling CAD connectivity and configuration functionalities.
Some objects can be controlled by parameters. The parameters can define the width and height of a door, the material of a bed or the number of bars in a window. If the GDL Object Web Control gets parameters that weren't listed before, it passes these parameters to the object. The object can use them and their values instead of the default parameters. If a parameter is a real number, when passed to the GDL Object Web Control the name of the parameter must begin with the letter 'r'. (e.g., rA=4.5 means that the A parameter has a value of 4.5). If the parameter is a string, its name must start with the letter 's'. The GDL Global variables are also set with this method and using their long names. GDL Object Web Control uses "GDLParams" parameter for this purpose in the case of Internet Explorer on Windows. The different GDL parameters have to be separated by '&'. E.g.: name="GDLParams" value="rA=1&rB=2".
Syntax:
rParameterName[,arrayIndex1[,arrayIndex2]]="Value of the Parameter" or
sParameterName[,arrayIndex1[,arrayIndex2]]="Value of the Parameter",
where
arrayIndex1, arrayIndex2: are indices if the parameter is an array.
(available from version 1.03)
JavaScript Commands:
Available from Version:1.04
Parameters:
'parameterIndex[,arrayInd1[,arrayInd2]]'
Result:
'description;displayed value;paramname;value'
Comments:
Available from Version:
1.04
Parameters:
'sParamName[,arrayInd1[,arrayInd2]]="stringValue"'
'rParamName[,arrayInd1[,arrayInd2]]="numValue"'
Result:
'OK' or 'Java Script Error'
Comments:
Available from Version:
1.04
Parameters:
'PARAMETERSETTINGS'
'SAVEOBJECT'
'SAVEIMAGE'
'PREVIEW'
'DRAWING2D'
'WIREFRAME'
'HIDDENLINE'
'SHADING'
'PHOTORENDERING'
'VIEWOPTIONS'
'PREFERENCES'
Result:
'OK' or 'Java Script Error'
Comments:
Available from Version:
1.04
Parameters:
Result:
the version of the Control
Comments:
Available from Version:
1.04
Parameters:
Result:
'BUSY'
'READY'
Comments:
Available from Version:
1.04
Parameters:
Result:
the number of parameters
Comments:
Available from Version:
1.04
Parameters:
'index_of_parameter'
Result:
'parType;structType;parFlags;dim1;dim2
[;isCustom;hasRange
[;val1,low1,up1,stepBeg1,stepVal1,flags1
[;val2,low2,up2,stepBeg2,stepVal2,flags2]...]]'
or
'Java Script Error'
or
'NOT READY'
Comments:
Where
parType can be:
'INTEGER'
'LENGTH'
'ANGLE'
'REAL'
'BOOLEAN'
'RGBVALUE'
'INTENSITY'
'LINETYPE'
'MATERIAL'
'FILL'
'PEN'
'STRING'
'SEPARATOR'
'TITLE'
structType can be:
'SIMPLE_PARAM'
'ARRAY_PARAM'
'LIST_PARAM'
parFlags number contains the parameter flags
dim1 number is first dimension of an parameter with 'ARRAY_PARAM' structType
dim2 number is second dimension of an parameter with 'ARRAY_PARAM' structType
if structType is'LIST_PARAM'
isCustom number 0 if list has no custom item
hasRange number 0 if list has no range item
valN,lowN,upN,stepBegN,stepValN,flagsN are the value, the lower limit, the upper limit, the step beg, the step value and the flag of the Nth list item respectivly
Available from Version:
1.04
Parameters:
'ATTRIBUTE_TYPE'
ATTRIBUTE_TYPE: MATERIAL, LINETYPE, FILL, PEN
Result:
the number of attributes
Comments:
Available from Version:
1.04
Parameters:
'ATTRIBUTE_TYPE, name_of_attribute'
Result:
the index of the attribute
Comments:
Available from Version:
1.04
Parameters:
'ATTRIBUTE_TYPE, index_of_attribute'
Result:
the name of the attribute
Comments:
Available from Version:
1.05
Parameters:
Result:
Comments:
Must be called after the Plug-in loaded and before the first effective Java command executed
Available under IE and NS6 on Mac
Available from Version:
1.10
Parameters:
'OPERATION'
'SAVE'
Result:
'BUSY', 'READY'
'SAVED' if the object is saved or
dropped onto an other application, otherwise
Comments:
Available from Version:
1.10
Parameters:
'MAIN'
'MASTER'
'GDLLIST'
'INFO'
'BASE'
Result:
URL of the main GDL Object
URL of the Master.GDL file
URL of the gdllist.txt
URL of the info file
Base URL
Comments:
Available from Version:
1.10
Parameters:
'sParamName1[,arrayInd1[,arrayInd2]]="stringValue"&'...
'&sParamNameN[,arrayInd1[,arrayInd2]]="stringValue"'
'rParamName1[,arrayInd1[,arrayInd2]]="numValue"&'...
'&rParamNameN[,arrayInd1[,arrayInd2]]="numValue"'
Result:
Comments:
Available from Version:
1.25
Parameters:
'PAN_MODE'
'ZOOM_IN_MODE'
'ZOOM_OUT_MODE'
'FIT_IN_MODE'
'RESET_MODE'
Result:
Comments:
Available from Version:
1.25
Parameters:
'SCALEX, SCALEY, ORIGOX, ORIGOY'
Result:
Comments:
Available from Version:
1.25
Parameters:
Result:
'SCALEX, SCALEY, ORIGOX, ORIGOY'
Comments:
Available from Version:
1.50
Parameters:
'PARAMETERSETTINGS'
' SAVEOBJECT'
'SAVEIMAGE'
'PREVIEW'
'DRAWING2D'
'WIREFRAME'
'HIDDENLINE'
'SHADING'
'PHOTORENDERING'
'VIEWOPTIONS'
'PREFERENCES'
Result:
Comments:
Equivalent to MENUCOMMAND.
MENUCOMMAND is obsolete.
Available from Version:
1.50
Parameters:
'PAN_MODE'
'ZOOM_IN_MODE'
'ZOOM_OUT_MODE'
'FIT_IN_MODE'
'RESET_MODE'
Result:
Comments:
Equivalent to UI_MODE
UI_MODE is obsolete. Available from Version:
1.50
Parameters:
'VIEW'
'OBJ'
'SHOWTYPE'
'PROJ'
'CUSTAXONDEFS'
Result:
'pX,pY,pZ'
'oX,oY,oZ'
'stype'
'projcode'
'cdef'
Comments:
pX, pY, pZ, oX, oY, oZ are numbers.
The stype can be any of the following:
WIREFRAME, HIDDENLINE, SHADING, PHOTORENDERING.
The projcode can be any of the following:
CUST_AXON, FRONT_VIEW, FRONTAL_AXON, DIMETRIC_AXON, PERSPECTIVE, TOP_VIEW, ISOMETRIC_AXON, MONOMETRIC_AXON
The cdef value has the following format:
projangle, lengthx,lengthy,lengthz,anglex,angley,anglez
Example: SHOWTYPE=WIREFRAME&CustAxonDefs=270,0,1,1,0,0,-90 sets the show type to wireframe and the axonometry to side view. Available from Version:
1.50
Parameters:
'VIEWX=pX&
VIEWY=pY&
VIEWZ=pZ&
OBJX=oX&
OBJY=oY&
OBJZ=oZ&
SHOWTYPE=stype&
PROJ=projcode&
CUSTAXONDEFS=cdef'
Result:
Comments:
The & character is the separator.
pX, pY, pZ, oX, oY, oZ are numbers.
The stype can be any of the following:
WIREFRAME, HIDDENLINE, SHADING, PHOTORENDERING.
The projcode can be any of the following:
CUST_AXON, FRONT_VIEW, FRONTAL_AXON, DIMETRIC_AXON, PERSPECTIVE, TOP_VIEW, ISOMETRIC_AXON, MONOMETRIC_AXON
The cdef value has the following format:
projangle, lengthx,lengthy,lengthz,anglex,angley,anglez
Example: SHOWTYPE=WIREFRAME&CustAxonDefs=270,0,1,1,0,0,-90 sets the show type to wireframe and the axonometry to side view. Available from Version:
1.50
Parameters:
'DD_SIMPLE'
'DD_CTRL'
Result:
Comments:
Simple drag or drag with CTRL activates the Drag&Drop functionality. Available from Version:
1.50
Parameters:
'Effects=1+64'
Result:
Comments:
The special effects of the 3D Visualization. The default value combination is 65. Possible values:
1 Sun is on.
2 Lights are on.
4 Turns on the sun shadow in the Photorendering.
8 Turns on the light's shadow in the Photorendering.
16 Turns the high accuracy in the shadow mapped Photorendering. It is effective if the 1 and 4 values are set.
32 Turns on vectorial sun shadow casting. It is effective only in WireFrame, Hidden Line and Shading modes.
64 Turns on vectorial hatching in Shading and Hidden Line modes.
128 Turns on the contours in the shaded view.
Available from Version:
1.50
Parameters:
'documentname'
Result:
Comments:
Sets the document name in the Save dialog. Available from Version:
1.50
Parameters:
'ACAD'
'AC'
Result:
Comments:
AutoCAD or ArchiCAD pen color table. Available from Version:
1.50
Parameters:
'filename;format'
Result:
Path of the saved file.
Comments:
The format parameter is any of the following:
3DStudio
Art*lantis
Lightscape
QuickDraw
VRML
WaveFront
DXF
DWG
IFC
MicroStation
SVF
ElectricImage
Strata
GDL
JPG
Available from Version:
1.50
Parameters:
'mode;filename'
Result:
Comments:
The mode parameter can be SILENT or PROMPT. The user gets a Save Dialog in prompt mode. Available from Version:
1.50
Parameters:
'mode;filename;content'
Result:
Comments:
The mode parameter can be SILENT or PROMPT. The user gets a Save Dialog in prompt mode. Available from Version:
2.00
Parameters:
Result:
'xmin,xmax,ymin,ymax,zmin,zmax'
Comments:
You can get the dimensions of the bounding box.
The value of zmin and zmax undefined in 2D. Available from Version:
2.00
Parameters:
'ATTRIBUTE_TYPE, index_of_attribute'
Result:
'R,G,B'
Comments:
Where R, G and B is the red, green and blue component of the attribute respectively. Available from Version:
2.00
Parameters:
Result:
the number of globals
or
'NOT READY'
Comments:
Available from Version:
2.00
Parameters:
'index_of_global'
Result:
'type;modifier;flag;dim1;dim2'
type: INTEGER, LENGTH, ANGLE, REAL, BOOLEAN, RGBVALUE, INTENSITY, LINETYPE, MATERIAL, FILL, PEN, STRING
modifier: ARRAY_PARAM, SIMPLE_PARAM
dim1, dim2: the dimensions of the array or -1
Comments:
Available from Version:
2.00
Parameters:
'parameterIndex[,arrayInd1[,arrayInd2]]'
Result:
'description;displayed value;paramname;value'
or
NOT READY
Comments:
Available from Version:
2.00
Parameters:
'mode;name'
Result:
the path of the file or
'CANCELED'
or
'ERROR'
Comments:
You can open a file with this command. The mode parameter can be 'SILENT' or 'PROMPT'.
You get an Open Dialog in 'PROMPT' mode, in this case name is a filter.
In 'SILENT' mode name is a full path of the file You want to open.
Available from Version:
2.00
Parameters:
Result:
next part of the file
Comments:
You can retrieve next part of the file into sResult the with this command.
The file have to be previously opened by the 'GETLOADFILE' command.
You have to call periodically this command to get the full content of the file,
until you retrieve empty string as sResult. Available from Version:
2.00
Parameters:
'TRUE'
'FALSE'
Result:
Comments:
You can hilight the enabled AC hotspots of the Object with this command. Available from Version:
2.00
Parameters:
'action1;objList1...actionN;objListN'
Result:
Comments:
You can enable or disable AC hotspots of the Object with this command. action can be 'ENABLE' or 'DISABLE'
objlist can be either a list of ids separeted by coma or 'ALL'.
Example:'DISABLE;ALL;ENABLE;1,2;'
Available from Version:
2.00
Parameters:
'ROT_NO'
'ROT_REVERSE'
'ROT_FORWARD'
Result:
Comments:
You can control behaviour of the camera with this command. Available from Version:
2.00
Parameters:
'TRUE'
'FALSE'
Result:
Comments:
With the help of this command you can accumulate effects of multiple calls of the same kind of commands. Be careful while using this command! If this command is once called with 'FALSE', the Control "falls asleep", and swiches into a so called "accumulating mode". While the Control is in this mode you can change the parameters without taking effect, or even use SETADDSCRIPT, SETDELSCRIPT commands of the Configurator without any effect. You have to rise up the Control from this mode! If you want to finish accumulating, and make those kind of commands to take effect you have call this command with 'TRUE' before the last call of those kind of commands, and then the Object rebuilds again.
