List of Parameters

Configurate CADViewer window using parameters

There are two options to set up parameters in CADViewer. The first method is to add a param tag in within the < applet ...> and </applet> tag that is embedded into a html file which will launch the viewer.
Example:

< param name="defaultlanguage" value="english">

The other method is to set up parameters in a configuration file with the extension "cfg". This file is required and defined through a parameter within the < applet ...> and </applet> tag:
< param=viewer_config value=filename.cfg">
When a parameter is added to the configuration file, it can be done by adding a similar line as the following line any where in the configuration file:
defaultlanguage=english

Click here to see all available parameters

ALERT! If a parameter is defined in both format, then the one defined in the < applet > ... </applet> tag will overwrite the one defined in the configuration file

  1. Required Parameters

    HTMLConfiguration FileValue/
    Description
    < param name="name" value="./demo.html">Not Available"./drawing.dwf"
    Drawing URL
    < param name="config_file" value="viewer.cfg>Not Available"viewer.cfg"
    cfg file URL
    < param name="configfile" value="viewer.cfg>Not Available"viewer.cfg"
    cfg file URL

  2. Viewer Window Parameters

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="type" value="panel">type=panel"panel","frame"
    "frame"
    frame: separate frame, panel: embedded to browser
    < param name="upper_toolbar" value="disable">upper_toolbar=disable"disable","enable"
    "enable"
    Hide Action toolbar
    < param name="redlinetool" value="vertical">redlinetool=vertical"vertical"
    Have the redline toolbar enable all the time and displayed vertically on the left
    < param name="floatsubtoolbar" value="enable">floatsubtoolbar=enableNone
    Have the sub toolbars displayed as sepated frames
    Deprecated< param name="redline_toolbar" value="disable">redline_toolbar=disable"enable","disable"
    "enable"
    Hide Redline toolbar
    REMOVED< param name="toolbar_size" value="small">toolbar_size=small"small","medium","large"
    "large"
    Set the size of the action toolbar and redline toolbar
    < param name="licensekeyfile" value="tms.license">licensekeyfile=tms.licenseRename the license.key file to a preferred name
    "license.key"
    To rename the "license.key" file to a different name
    < param name="licensekeylocation" value="../any/web/folder">licensekeylocation=../any/web/folderSet the path where the license.key file located
    codebase
    To put the "license.key" file in a different folder than the codebase
    < param name="left_justified" value="enable">left_justified=enableSet the drawing to be left justified. Available values="enable","disable"
    None
    Drawing is normally displayed on the center of the applet panel. This parameter is used to have the drawing displayed left justified

  3. Popup Menu Parameters

    HTMLConfiguration FileValues/
    Default/
    Description
    Not Availablepopupmenu=zoominzoomin
    None
    Add Zoom In action to popup menu
    Not Availablepopupmenu=zoomoutzoomout
    None
    Add Zoom out action to popup menu
    Not Availablepopupmenu=zoomwindowzoomwindow
    None
    Add Zoom window action to popup menu
    Not Availablepopupmenu=extentszoomextents
    None
    Add Zoom extents action to popup menu
    Not Availablepopupmenu=printprint
    None
    Add print action to popup menu
    Not Availablepopupmenu=panpan
    None
    Add pan action to popup menu
    Not Availablepopupmenu=layerslayers
    None
    Add layers to popup menu
    Not Availablepopupmenu=separatorseparator
    None
    Add a separtor line between items in the popup menu

  4. Open/Save Drawing Files Parameters

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="list" value="../../anyfolder/drawinglist.txt">list=../../anyfolder/drawinglist.txt"drawinglist.txt" can be any name for the file that list drawing to be viewed by users
    "drawing.txt" in the codebase folder
    Allow users to view selected drawings on the servers
    < param name="saveas" value="save.dwf">saveas=save.dwf"save.dwf" can be any name for the file to be saved
    None
    Allow users to save the drawing on the server to local machine. If the file to be saved a dwg file, then there must exit a dwg on the server.
    < param name="openfilelocation" value="local">openfilelocation=local"local","local&server","server"
    "local"
    Allow to Open drawing from local machine, server or both
    < param name="save_drawing_file_path" value="./drawings/demo.dwf">save_drawing_file_path=./drawings/demo.dwfThe relative path that the drawing should be saved
    None
    Determine the path where the drawing should be saved
    < param name="save_drawing_to_url" value="http://www.xyz.com/cgi-bin/yourscript.cgi?p1=v1&p2=v2&p3=v3&.....&pn=">save_drawing_to_url=http://www.xyz.com/cgi-bin/yourscript.cgi?p1=v1&p2=v2&p3=v3&.....&pn=CADViewer will post the request to server and fill out the last parameter value
    None
    CADViewer will send the request to the server and it will fill the last parameter with the drawing content. If value="http://www.xyz.com/cgi-bin/yourscript.cgi", then CADViewer will send 2 parameter: 1) saveLocation value=the value of the parameter "save_drawing_file_path" 2) redlinesdwf value=the content of the drawing or the drawing+redline
    Deprecated
    < param name="allow_read_local_drawing" value="true">
    allow_read_local_drawing=true"true"
    None
    Allow open drawing from both server and local machine
    Removed
    < param name="open_file" value="enable">
    open_file=enable"enable"
    None
    Removed. Allow open drawing from server
    < param name="save_drawing_to_url" value="http://www.xyz.com/servlets/FileUploadServlet">save_drawing_to_url=http://www.xyz.com/servlets/FileUploadServletThe URL of the script used to save drawing to server
    None
    Use this parameter to determine the URL of the script/servlet used to save the drawing to the server
    < param name="initialdrawinglocation" value="local">initialdrawinglocation=local"local","server"
    "server"
    Allow open drawing from local machine initially

  5. Open/Save Redline Files Parameters Click for Examples

    To Parameter List
    HTMLnp Configuration File Values/
    Default/
    Description
    < param name="clearredline" value="enable">clearredline=enable"enable" to allow redlines to be modified, "disable" to prevent redlines to me modified
    "enable"
    Use this parameter to control whether open redlines can be modified/saved back to server
    < param name="redlinelocation" value="local"> redlinelocation=local "local","server","local&server"
    "local"
    Determine the location to Open/Save Redline files.
    < param name="save_redline_method" value="local"> save_redline_method=local "local","server","local&server"
    "local"
    Determine the location to Save Redline files.
    < param name="save_redline_directory" value="c:\temp"> save_redline_directory=c:\temp The path on the local machine where redline file will be saved
    None
    This parameter is used for save redline locally and user interaction is not allowed.
    < param name="save_redline_filename" value="demo.red"> save_redline_filename=demo.red The redline file name
    None
    This parameter is used for save redline locally and user interaction is not allowed.
    < param name="save_redline_in_drawing_as" value="redlines"> save_redline_in_drawing_as=redlines The layer name for redline objects
    None
    This parameter is used for save redline objects as a layer in the drawing.
    < param name="list_redline_files" value="*.red"> list_redline_files=*.red "*.red","*.red;*.dwf","extensions"
    "extensions"
    This parameter is used to show certain type of redline files to open. "extensions" will display all redline file types available in CADViewer.
    Deprecated
    < param name="allow_read_local_drawing" value="true">
    allow_read_local_drawing=true "true"
    None
    Allow open drawing from both server and local machine
    < param name="redline_cgi" value="./cgi/redsaver.cgi" redline_cgi=./cgi/redsaver.cgi The URL of the redline saver cgi script.
    None
    The URL of the cgi script file
    < param name="redline_file" value="/redlines/test.red"> redline_file=/redlines/test.red The redline file location
    None
    The redline file name and location to be saved.
    < param name="redline_file_path" value="/redlines/test.red"> redline_file_path=/redlines/test.red The redline file location
    None
    The redline file name and location to be saved.
    < param name="save_redline_to_url" value="./cgi/redsaver.cgi" save_redline_to_url=./cgi/redsaver.cgi The URL of the redline saver cgi script.
    None
    The URL of the cgi script file
    Deprecated
    < param name="save_redline_file_to_url" value="/redlines/test.red">
    save_redline_file_to_url=/redlines/test.red Use "redline_file" or "redline_file_path"
    < param name="open_redline_with_drawing" value="initial"> open_redline_with_drawing=initial "initial", "always"
    None
    Open a specified redline file either at the time the drawing is loaded or all the time whenever "open redline file" button is clicked.This parameter is used with either "load_redline_from_url" or "open_redline_from_url" to control how redline files are opened.
    < param name="load_redline_from_url" value="/redlines/test.red"> load_redline_from_url=/redlines/test.red "test.red" redline file will be opened either intially or always depending on the value of the parameter "open_redline_with_drawing"
    None
    The redline file name and location to be opened.
    < param name="open_redline_from_url" value="/redlines/test.red"> open_redline_from_url=/redlines/test.red "test.red" redline file will be opened when user click on the "open redline file" button
    None
    The redline file name and location to be opened with CADViewer. This will only allow user to view this redline file only
    < param name="open_redline_list_script" value="http://www.xyz.com/cgi-bin/redlineScript.cgi"> open_redline_list_script=http://www.xyz.com/cgi-bin/redlineScript.cgi The name of the script that will provide CADViewer with a list of reline file names
    None
    When CADViewer communicates with the script, this script will provide cadviewer with the URL of the redline file and the short name for the file
    Example: http://www.xyz.com/redlines/redlineA.red A.red
    < param name="preload_readonly_redline" value="http://www.xyz.com/redlinefolder/demo.red"> preload_readonly_redline=http://www.xyz.com/redlinefolder/demo.red Load the redline with the drawing and does not allow to save these redlines
    None
    Can load more than one read-only redline files. File names are separated by ";"

  6. Printing

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="multipleprint" value="printlist.txt">multipleprint=printlist.txt"printlist.txt" is any text file that list drawing files to be printed
    None
    Example of "printlist.txt"
    ./drawings/print1.dwf
    ./drawings/print2.dwf
    ./drawings/print3.dwf
    < param name="print_default" value="api">print_default=api"all","direct","api"
    "all" : Display all available printing options
    If print_default is defined, then only the defined printing method is available.
    REMOVED
    < param name="imagewidth" value="8">
    imagewidth=8The width of the image
    None
    Set the width of the drawing width.
    < param name="print_to_scale" value="in">print_to_scale=in"in","ft","mm","cm"
    None
    Set the unit for the imagewidth.
    < param name="printblackwhite" value="enable">printblackwhite=enable
  7. "enable","disable"
  8. "disable"
  9. Set printing output to black and white
  10. < param name="printdialog" value="disable">printdialog=disable
  11. "enable","disable"
  12. "enable"
  13. Set whether to allow user interactions when drawing is printed
  14. < param name="printbackgroundcolor" value="enable">printbackgroundcolor=enable
  15. "enable","disable"
  16. "disable"
  17. Use this parameter to print the current background color. The default is to print on white background
  18. < param name="printredlines" value="disable">printredlines=disable
  19. "enable","disable"
  20. "enable"
  21. Set whether to print redline objects with the drawing. This parameter is used when user interaction is disabled by parameter "printdialog"
  22. < param name="print_insertionpoint" value="enable">print_insertionpoint=enable
  23. "enable","disable"
  24. "disable"
  25. CV normally prints what is displayed on screen. This parameter gives user choice to select what to print

  26. Collaborator

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    Removed
    < param name="collaboratorhostip" value="67.112.1.1">
    collaboratorhostip=67.112.1.1
  27. The IP address of the collaborator server
  28. None
  29. This parameter tells CADViewer where the collaborator is located
  30. < param name="collaboratorURL" value="http://67.112.1.1:8080/collaborator/servlet/CollaboratorServlet">collaboratorURL=http://67.112.1.1:8080/collaborator/servlet/CollaboratorServlet
  31. The servlet on the server that will monitor the collaborator
  32. None
  33. This parameter will help CADViewer to send requests to the collaborator servlet that monitors the collaborator

  34. Conversion Tools

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="conversionurl" value="http://67.112.1.1:8080/collaborator/servlet/ConversionServlet">conversionurl=http://67.112.1.1:8080/collaborator/servlet/ConversionServlet
  35. The servlet on the server that will monitor the file conversions
  36. None
  37. This parameter will help CADViewer to send requests to the conversion servlet that convert none dwf file to dwf files

  38. Measurement Tool

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="userscale" value="0.5">userscale=0.5
  39. Multiply the linear measurement by this scale
  40. None
  41. This parameter is used to correct the scale defined within the drawing. For example, if the unit in the drawing is in "in" but the actuall unit is in "ft", then scale should set to 1/12=.0833333
  42. < param name="unitnamescale" value="in,0.005">unitnamescale=in,0.005
  43. Define the units for the drawing
  44. None
  45. If there is no drawing units defined in the drawing, this parameter can be used to set the units for the drawing
  46. < param name="setunitsname" value="in">setunitsname=in
  47. Define the units name for the drawing.
  48. None
  49. If the value is "null", CADViewer will ignore the units defined in the drawing and treats the drawing as no units defined

  50. Miscellaneous

    To Parameter List
    HTMLConfiguration FileValues/
    Default/
    Description
    < param name="polylinearrow" value="last">polylinearrow=last
  51. "last","first"

  52. "first"

  53. Use this parameter to determine whether the arrow should be put at the first point or the last point on the polyline arrow redline object
  54. < param name="redlinecolors" value="disable">redlinecolors=disable
  55. "disable"

  56. None

  57. Use this parameter to hide the color selection in redline toolbar. Should use parameter "default_redline_color" to define redline color
  58. < param name="default_redline_color" value="red">default_redline_color=red
  59. "black","white","blue","yellow","red","gray","dark gray","light gray","green","magenta","orange","pink"

  60. "red"

  61. Use this parameter to determine set the default redline color when the color selection in the redline toolbar is hidden
  62. < param name="local_help" value="http://www.xyz.com/viewer/help.html">local_help=http://www.xyz.com/viewer/help.htmlURL to the help file or a call to a javascript function
    None
    Example: http://www.xyz.com/viewer/help.html or
    javascript:localhelp (this will execute the javascript localhelp()
    < param name="on_layers" value="l1;l2;l3">on_layers=l1;l2;l3Layers l1,l2 and l3 will be displayed
    Display all layers
    Only display listed layers initally
    < param name="off_layers" value="l1;l2;l3">off_layers=l1;l2;l3Layers l1,l2 and l3 will be hiden
    Display all layers
    Hide all layers on the list
    < param name="water_mark" value="http://www.xyz.com">water_mark=http://www.xyz.comhttp://www.xyz.com will be displayed on the screen as a watermark
    None
    The designed watermark
    Deprecated< param name="loading_sign" value="Load drawing ...">loading_sign=Load drawing ..."Load drawing ..."
    None
    The displayed message when drawing is loading
    < param name="initial_view_name" value="Entired Building">initial_view_name=Entired Building"Entired Building" named view will be diplayed when the drawing is loaded
    None
    The initial named view to be viewed.
    Deprecated< param name="findview" value="Entired Building">findview=Entired Building
  63. "Entired Building" named view will be diplayed when the drawing is loaded
  64. None
  65. Deprecated. Use "initial_view_name"
  66. < param name="background_color" value="white">background_color=white"white","black","blue","yellow","red"
    "black"
    Viewer background color.
    < param name="defaultlanguage" value="english">defaultlanguage=english"english","spanish","swedish",....
    english
    The language used when drawing is loaded.
    Not Availablelanguage=thelanguagethelanguage is any language that you want to be available
    None
    Add a language to the language list.
    < param name="fillmode" value="off">fillmode=off"off"
    None
    Turn fillmode off.
    < param name="hideobjectsize" value="3">hideobjectsize=3The max size of the object in pixels
    None
    Do not draw objects that the size is smaller than the size defined in "hideobjectsize" parameter.
    < param name="init_blackonwhite" value="enable">init_blackonwhite=enableDisplay drawing black on white as the default
    None
    < param name="userscale" value="48.0">userscale=48.0The modified scale
    None
    The measurement will be multiplied with this scale
    < param name="forcechoiceoffont" value="SansSerif">forcechoiceoffont=SansSerifAvailable fonts are: Dialog, SansSerif, Helvetica, DialogInput, Serif, Monospaced, TimesRoman, Courier and ZapfDingbats
    None
    Display this font to the drawing
    < param name="zoomextents_onload" value="enable">zoomextents_onload=enableEnable
    None
    Force automatic Zoom to Extents on load
    < param name="debug" value="enable">debug=enable"enable","disable"
    None
    "enable" will print out debug info to java console
    < param name="target" value="_blank">target=_blank"_blank","_self","_new"
    "_blank"
    To open a link in the drawing with a current browser window or new browser window
    < param name="url_target" value="_blank">url_target=_blank"_blank","_self","_new"
    "_blank"
    To open a link in the drawing with a current browser window or new browser window
    < param name="redlinethickness" value="10">redlinethickness=10To set the line thickness for redline objects
    1
    If this parameter is not defined, the line thickness is assigned to 1
    < param name="watermarkcolor" value="red">watermarkcolor=red"black","white","blue","yellow","red","gray","dark gray","light gray","green","magenta","orange","pink"
    "red"
    To set the color for the watermark text
    < param name="watermarklocation" value="middle">watermarklocation=middle"top","middle","bottom"
    "middle"
    To set the location for the watermark text
    < param name="watermarksize" value="30">watermarksize=30Any integer value
    30
    To set the size for the watermark text

  67. Parameter List


    allow_read_local_drawing
    background_color
    clearredline
    collaboratorurl
    config_file
    configfile
    conversionurl
    debug
    default_redline_color
    defaultlanguage
    fillmode
    findview
    floatsubtoolbar
    forcechoiceoffont
    imagewidth
    initial_view_name
    initialdrawinglocation
    left_justified
    licensekeyfile
    licensekeylocation
    list
    list_redline_files
    load_redline_from_url
    local_help
    name
    off_layers
    on_layers
    open_redline_from_url
    open_redline_list_script
    open_redline_with_drawing
    openfilelocation
    polylinearrow
    preload_readonly_redline
    print_default
    print_to_scale
    printbackgroundcolor
    printblackwhite
    printdialog
    print_insertionpoint
    printredlines
    redline_cgi
    redline_file
    redline_file_path
    redlinecolors
    redlinelocation
    redlinetool
    redlinethickness
    save_drawing_file_path
    save_drawing_to_url
    save_redline_directory
    save_redline_file_to_url
    save_redline_filename
    save_redline_in_drawing_as
    save_redline_method
    save_redline_to_url
    saveas
    setunitsname
    target
    unitnamescale
    upper_toolbar
    url_target
    userscale
    water_mark
    watermarkcolor
    watermarklocation
    watermarksize
    zoomextents_onload