CADViewer Latest Changes


10.5.1a-10.6.3a: 2013-04-29:

Implemented Headless version of CADViewer with Object Node interface. Allows CADViewer to be called as a server side process to extract API information.UrlPolygonColor( ..)


9.8.1a: 10-12-02:

When redline toolbar permanently on, <param name="redlinetool" value="vertical"> , redlines manager would be turned off when swapping to other menu groups with sub-menu bars, such as compare, measure and rotate. Redlines manager is now permanently on when redlinetool bar is permanently visible


9.7.8d-e: 10-11-30:

Various fixed for highlight (fill polygon) on/off for Url’s fixed in methods, SetUrlPolygonColor(..) and RemoveUrlPolygonColor( ..)

New method implemented:

public String GetAllUrlScriptObjectNames()

9.7.8f-g: 10-12-01:

Compare icons reactivated, various bugs fixed


9.5.5a-9.6.3a: 10-08-19 – 10-09-12:

Custom commands

9.6.3b: 10-09-13:

Fixed bug when hyperlinks contained white-spaces.

9.6.3c: 10-09-13:

Force redlines objects in .red files on save and on creation to be non-filled. A dwf file with not close filled polygons would make redlines fill.

9.6.3c – 9.7.8a: 10-09-13 – 10-11-20:

Custom extensions to a new sticky note interface and database connectivity


9.5.1a: 10-06-08:

Disabling API if in either unlicensed or in trial mode.

9.5.3a: 10-07-20:

Build parameters for custom control of icons .

<param name="image_path" value="images_new/">

<param name="sethgap" value="3">

<param name="setvgap" value="3">

<param name="menubackgroundcolor" value="#E6EBF1">

<param name="overlaymenuicons" value="enable">

<param name="menuicon_append" value="_over">

In the parameter image_path, you define the path to the images, as a subdirectory to /cadviewer.

The parameters sethgap (set horizontal gap) and setvgap (set vertical gap) sets the spacing between the icons.

The parameter menubackgroundcolor sets the background color.

The parameter overlaymenuicons tells the system that you are using overlay icons, in the menuicon_append parameter you tell the system what you have appended to the icon name for the overlay icon.

9.5.3c: 10-07-28:

Implemented parameter <param name="noserverportsettings" value="enable"> to be able to overwrite port settings when loading in drawing files.

9.5.4a: 10-07-29:

Fixed bug where color settings in multiple consecutive object nodes where incorrect. Changed code to allow it to compile properly both as Applet and Application.

9.5.4d: 10-08-05:

Fixed zoom extents bug in pop-up menu, fixed print method bug where multiple print selection boxes appeared. Added new parameter to print to control redlines printing

<param name="supressredlinesprint" value="enable">

9.5.5a: 10-08-19:

Implemented API commands: PanUp(), PanDown(), PanLeft(), PanRight()


9.4.1a: 10-06-02:

Implemented 12 colors redline bar.

9.4.1b: 10-06-04:

In ContactServer method, fixed bug translating “+” to hex.


9.3.0a: 10-04-19:

Implemted Zoom Smoothly to Extents; the extents on layers in a list are calculated and zoomed smoothly onto, but with a relative zoomfactor. Parameters are:

layerList  list of the layers which extents are calculated, zoomfactor  zoomfactor in % based on the extents zoomwindow , number of distinct views in the zoom process

public void ZoomSmoothlyToExtents(String layerList, int zoomfactor, int steps)

9.3.0b: 10-04-20:

Bug fixed when ZoomSmoothlyToExtents was fed a non existing layer.

9.3.1b: 10-04-21:

Hyperlinks now based on MOUSE_UP. Fixed display bug of popup menu when hovering over hyperlinks.

9.3.1d: 10-04-23:

The parameter tooltipstatus return mechanism has been tidied up.

<param name="tooltipstatus" value="ToolTipInfoXY" >

Tooltipstatus will fire off only once at a time, either when a no urlfocus state is reached or when entering a linked object:

No focus initially or exiting an object: nourlfocus

Entering an object: objectId

9.3.1g: 10-04-23:

Bug in format recognition method. If a string from a script with multiple format statements in it, the input method will now read in the last format statement.

9.3.1h: 10-04-23:

The parameter has been implemented.

<param name="supressasp" value="enable" >

This disables the input string parser for asp type arguments, in effect passing the input string directly over to either a server side conversion script or Servlet.

9.3.2a: 10-04-24:

The parameter has been implemented:

<param name="nourlfocuscallbackmethod" value="nourlclick" >

This will call an external JS method named “value” with the arguments (nourlfocus, mouseclicks), allowing external API handling in the case the mouse is pressed over a region without a Url associated with it.

9.3.2b: 10-04-29:

screenToJpegLocal did not clean up files properly, causing external processes to hang, when trying to read the produced jpg file.

9.3.3a: 10-05-05:

The parameter has been implemented:

<param name="save_with_API_modifications" value="enable">

An DWF-out parser has been implemented, which with the parameter active will prompt a save of the DWF file currently in memory including API modifications.

9.3.4a: 10-05-11:

Export screen view as a DWF to the server, if parameter is set:

<param name="save_with_API_modifications" value="enable">

<param name="conversionURL" value="http://ip/servlets/ConversionServlet">

On the server it is converted based on the settings in:

<param name="conversionparameters" value="-f=pdf ">

API method:

public boolean SaveAndConvertDwfWithAPIModifications(

boolean blackwhite,

boolean whitebackground,

boolean landscapeportrait)


9.2.0b: 10-04-15:

Eventhandling rewritten for 1.6; MouseWheel for zoom in/out implemented.

9.2.0b-d: 10-04-18:

Various traces for debug mode implemented in order to better diagnose issues with perl script load of server side converted files.


9.1.0a-9.1.0j: 09-10-10 till 08-10-24: Rewrite of awt classes so that the common codebase both compiles as applet and as awt .jar under java6.

9.1.1a: 09-10-26: Extended polytriangels so filled triangles will render when objects are long and narrow, pixel width lower than one.

9.1.2a: 09-11-26: Enabled vertical redline toolbar. Requires a workaround, where the redline on/off button is set to zero size in the config file (pointing at a void bitmap icon will do)

9.1.3a: 09-12-02: ZoomExtents error fixed. Spurious “garbage” objects would make disturb the extents calculation. By checking against the initial viewport, extreme values can be distorted.

9.1.3d: 09-12-05: Implemented parameter <param name="supress_popup_messages" value="enable"> to let developers have more control over errorflow when feeding files to CADViewer through the API.

9.1.4a: 09-12-08: Rewrite of ServletQuery class to make loading of DWF via user defined Servlet consistent with the TMS implementation in ConversionServlet .

9.1.4b – 9.1.4f: Various fixes

9.1.4g: 10-01-20:


There have been added the following new parameters for server communication via Perl scripts:

<param name="usefullconversionpathnames" value="enable" >

<param name="donotencodeconversionpathnames" value="enable" >

The first parameter will ensure that the full name given in the applet code is included in the parameters sent down to the script, and the second line gives the option to make the name URL encoded or not:

9.1.5a: 10-02-25:

API command added: public boolean APIcommandCurrentlyActive() , which allows JS methods to monitor execution of API commands. Returns true if a command is active. Use public void ResetAPIcommand() to reset system variables.

9.1.6a: 10-03-09:

Parameter added. <param name="ExportClickCount" value="enable">. This parameter will append the mouseclick count as a value to Url hyperlinks and export the value to the encapsulating JavaScript method. Since double click are always returned, then the parameter setting below will allow both single and double clicks to be exported:

<param name="URLClick" value="single">

<param name="ExportClickCount" value="enable>

9.1.7a: 10-03-23:

Parameter added. <param name="encapsulate_hyperlinks" value="method"> This parameter will encapsulate hyperlinks with a method name as given in the parameter string. The parameter is used to allow syntactically incorrect hyperlinks to be caught by the encapsulating JavaScript code.

9.1.7b: 10-03-25:

Initialization bug fixed, where adding the parameter <param name="upper_toolbar" value="disable"> would disable mouse handlers for hyperlinks.


9.0.4a: 09-08-04: Added routine to find countour unit matrices, and modify scale accordingly in print scale command .

9.0.4b: 09-08-13: Added API routines:

SetUrlPolygonColor(String urlsubstring, int r, int g, int b), SetUrlPolygonColor(int UrlId, int r, int g, int b), RemoveUrlPolygonColor(int UrlId), RemoveUrlPolygonColor(String urlsubstring)

9.0.4c: 09-08-14: Added API routine: public Vector GetMultiPagesNames()

9.0.4d: 09-08-14: Updated Units methods to allow for the case where no unit matrix is defined in DWF file. Updated Calibrate Units methods so that it supports other languages.

9.0.4e: 09-08-27: Fixed ZoomExtents on layer bug.

9.0.4f: 09-09-09: Implemented ability to list polygons on click.

9.0.4g: 09-09-14: Return call on Url methods. Updated SetUrlPolygonColor() methods to handle multiple polygons associated with a Url.

9.0.5a: 09-09-22: Bug when layer definitions are encapsulated in {} in compressed binary dwf .

9.0.5b: 09-09-24: Fixed intersection bug when zooming out on images, TIFF images would disappear.

9.0.5c: 09-09-28: Image display bug for large scale bitmaps, image would in some cases be flushed and not recreated.

9.0.5d: 09-09-30: Display bug induces by error in parsing RGB encoded images.

9.0.5e: 09-10-02: Fixed intersection bug when doing zoom on TIFF images, images would be truncated, both on canvas and when printing.

9.0.6a: 09-10-07: Extended security manager so that API method OpenFile() can open files on external servers.


9.0.4a: 09-08-04: Added routine to find contour unit matrices, and modify scale accordingly in print scale command .


9.0.3a: 09-06-10: Add multiple page capabilities for staged files; DWF files split into singe files for each view. The parameters implemented are:

<param name="multiplepages" value="staged">

<param name="multiplePagesLocation" value="./3295-complete">

The parameter name, will designate the name of the “non-splitted “file only.

9.0.3b: 09-06-22: Fixing of various reported bugs in multiple pages splitting routine.

9.0.3c: 09-07-16: Changed multipage list parameter format to .txt: "__views.txt". Added new parameter <param name="no_measurement_crosshatch" value="enable"> , to remove crosshatch in measurement.

9.0.3d: 09-07-20: Fixed various bugs in multiple page capabilities.

9.0.3e-f: 09-07-22: Fixed bugs in printing method with scaled enabled and upper toolbar disabled.

9.0.3g: 09-07-24: Added routine to find contour unit matrices, and modify scale accordingly in measurement command.


9.0.2a: 09-05-26: Catch exceptions when loading multiple files through the API.

9.0.2b: 09-06-01: Implemented parameter: <param name="no_empty_redline_message" value="enable" /> to control output in API redline calls.

9.0.2c: 09-06-06: Implemented API method:

public void SetAllTextColorFontOnLayer(String layerList, boolean redraw,int r, int g, int b, String font);

9.0.2d: 09-06-10: Extended Opcode 0x0002, or group4pg, activated png branch so dwf reads in correctly, display of png is not yet implemented.


9.0.0a – 9.0.0d: 09-03-23 – 09-04-10: Major rewrite, all static references to classes removed and a hierarchy based on common variables in ViewerControls introduced. All external references in widget classes removed, redraw bug for polygons removed.

9.0.0e: 09-04-15: New parameter, force_orginal_colors implemented to allow for Revit contour polygons in background color below text objects.

9.0.0f: 09-04-16 – 09-04-20: Implemented switch to turn redlines redraw on/off depending on redlines icons are active or not. API redline methods will automatically turn the redlines redraw on. Improved the single object redline selection method, added XOR highlight and an improved search band. Redline Text tool improved, selected font, and size are copied to next selection.

9.0.0g: 09-04-21 - 09-04-23: Improved color handling in FillAllPolylinesOnLayer(), fixed zoom extend bug when calling FillAllPolylinesOnLayer(). Rewritten GetNamedView() to return a boolean if the view does not exist.

9.0.1a: 09-04-28 - 09-04-29: Fixed rounding issue in ActionUnits when units are feet/inch. Improved syntax for output of measurements, when units are in feet/inch and fractions.

9.0.1b: 09-05-11: Activation of methods to select drawing objects in window selection mode.

9.0.1c: 09-05-13: Print routine for filled poygons when setting fill color with API command: FillAllPolylinesOnLayer().

9.0.1d: 09-05-14 - 09-05-16: Build text selection routing as part of window selection, implemented parameter <param name="ontextselection" value="DisplaySelectedText" />, the value is the name of the JS return method that will hold the selected text objects.

Implemented parameter: <param name="keep_existing_redlines_on_load" value="enable" /> to allow loading of multiple redline objects.

9.0.1e/f: 09-05-19: Initial load of drawing creates a null pointer exception. Closed using try/catch statements

9.0.1g: 09-05-20: Colors of text objects are wrong when printing text objects which are changed through the API.


8.5.6a: 09-01-28: Allow servlet interaction with applet. Use argument of type in parameter name or in OpenFile() to talk to server servlet.

8.5.6c: 09-02-17: Fixed layer sorting, so that different layer numbers, but with same name are treated as the same layer. Fixed zoom extents bug for drawings with defined views.

8.5.6d: 09-03-10: Memory issue when printing TIFF files fixed, class cast issue when printing jpg,gif,png files fixed. Additional fix for layers done.

8.5.6e: 09-03-15:Ability to load and save hyperlink Url’s with http: and javascript:. Modifications to existing methods.

8.5.6f: 09-03-16:Ability for API command SetTextOnLayer().to work through object nodes.

8.5.6g: 09-03-17:New API commands: public void SetTextOnLayer(String layerList, int textNodeIndex, String newText, boolean redraw),

public void FillAllPolylinesOnLayer(String layerList, int r, int g, int b, boolean redraw),

public void RemoveFillAllPolylinesOnLayer(String layerList, boolean redraw);

Redraw added after redlines are turned off.

8.5.6h: 09-03-20: Implemented the ability to load and display hyperlink alternate text, when of the form:

(URL (167 'javascript:officeclick(\'168\',\'2442\');' 'this is the alternate hyperlink text'))

Modified redline load and save methods to use this format, as well as the hyperlink creation command.

8.5.6i: 09-03-23:New API methods implemented:

public void SetUrlAlternateText(int UrlId, String alternateText);

public void SetUrlAlternateText(String urlsubstring, String alternateText);

furthermore (EndOfDwf) termination criteria extended to set a termination Url widget and a Object node -1, to encapsulate declared url+object nodes that are not properly finished.


8.5.5a: 08-11-20 Feet-Inch in distance measurement, ActionUnits: x’ y” z/16

8.5.5b: 08-11-30 Ability to select object node redlines, ability to move object node redlines, ability to set object nodes redlines to “fixed scale” through the parameter: set_redlines_fixed_scale

8.5.5c: 08-12-02 Ability to select bitmap redlines, ability to set bitmap redlines to “fixed scale” through the parameter: set_redlines_fixed_scale

8.5.5d: 08-12-03 Send filled objects to the back to the file.

8.5.5e: 08-12-03 Implemented solution to be able to restore original color after fill. Implemented: RemoveFillAllPolylinesOnLayer(String layerList)

8.5.5f: 08-12-08 Found and fixed bug in 8.5.5e. Colors would only change back correctly first time an object is filled.

8.5.5g: 08-12-11 Bug when calling javascript call back methods after double click on objects; conflicting code with url highlight code. Documentation of ViewerApplet for javadoc

8.5.5h: 09-01-11: Reactivated the ability to load redlines in through applet parameter; code was broken.

8.5.5i: 09-01-15: Bug in Unit class, unable to load in a matrix of type ‘feet and inches’ , this is fixed.

8.5.5j: 09-01-15: Fixed bug in NamedViews and URL to receive text arguments of type {] .


8.5.4a: 08-10-28 public void FillAllPolylinesOnLayer(String layerList, int r, int g, int b) implemented and tested¨.

8.5.4b: 08-11-05 ZoomExtents implemented so that fitToScreen() loops over on layers only, and finds the extents on object on on layers only.

8.5.4c: 08-11-06 PolyTriangle redraw error fixed. Objects would not filled at a given zoom-level.

8.5.4d: 08-11-07 Add parameter disable_urlthread_message to disable warning message when no url’s in drawing and highlight Url is called.

8.5.4e: 08-11-10 To FileOpen include a check to prepend protocol “file:/” if the file is specified with a drive-name..

8.5.4f: 08-11-11 ButtonObjectSearch added to ActionManagerProAdapter.

8.5.4g: 08-11-12 Implemented GetPageNumber() and SetPageNumber(int).in ViewerApplet to control single pages in a multipage DWF file.

8.5.4h: 08-11-12 Implemented GetFormatExtension() for check on file extensions with ASP page upload of files.

8.5.4i: 08-11-12 Implemented GetFormatExtension() for check on file extensions with ASP page upload of files.

8.5.4j: 08-11-14 Implemented public void ZoomExtents(String layerList). Modified ZoomExtents to loop over ObjectNodes and find extents inside the graphical objects associated with that object.

8.5.4k: 08-11-17 Implemented public void ZoomExtents(String layerList, int zoomfactor). Zoomfactor 100 == zoom extents on layerlist, zoomfactor>100 is zoomin, zoomfactor<100 is zoomout.

8.5.4l: 08-11-8 Non decisive modifications

8.5.4m: 08-11-18 Modifed FillAllPolylinesOnLayer() to find polygons inside object nodes.


8.5.3a: New security manager to allow system to activate print through the API.

8.5.3d: Modify API methods for Redline delete, so that redraw is forced.

8.5.3d: Modify API method UrlOnOff so that a null pointer exception does not occur in UrlThread.

8.5.3f: Modify SetLayerColor() to also color layers with Object Nodes

8.5.3g: Added GetPages() to the API. Activate hyphensolution, NHB extra button in standard build. Identified errors with hyphensolution counter method; solutions do not work through the API; it works through the menu-bar but only if no other method (interactive methods) are active.

8.5.3h: 08-10-27. Implemented SetTextOnLayer(layerlist, number, textstring); All Hyphensolution methods, CountingOnOff(),StartStopCounter(),DeleteCount() are working if <param name="upper_toolbar" value="disable">

8.5.3i: 08-10-28 public void FillPolylineOnLayer(String layerList, int polygonNodeIndex, int r, int g, int b) implemented and tested¨.


Version 8.0.8c

Version 8.0.4

Version 8.0.3


Version 7.2.2

Version 7.2.1

Version 7.1.7

Version 7.1.6

Version 7.1.5

Version 7.1.4

Version 7.1.3

Version 7.1.2

Version 7.1.1

Version 7.0.17

Version 7.0.16

Version 7.0.15

Version 7.0.14

Version 7.0.13

Version 7.0.12

Version 7.0.11

Version 7.0.10

Version 7.0.09

Version 7.0.08

Version 7.0.07

Version 7.0.06

Version 7.0.05

Version 7.0.04

Version 7.0.03

Version 7.0.02

Version 7.0.01

Version 7.beta.19

Version 7.beta.18

Version 7.beta.17

Version 7.beta.16

Version 7.beta.15

Version 7.beta.14

Version 7.beta.13