CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Language and Menu Layout

Language Settings

All text elements in the menu system is loaded in from an XML file at initialization. The method cvjs_loadCADViewerLanguage() sets the language and location of the XML file.

// CHANGE LANGUAGE - DEFAULT IS ENGLISH
cvjs_loadCADViewerLanguage("English", "/app/cv/cv-pro/language_table/cadviewerProLanguage.xml");
// Available languages: "English" ; "French, "Korean", "Spanish", "Portuguese", "Portuguese (Brazil)" ; "Russian" ; "Malay" ; "Chinese-Simplified"

Click on the method to open the API documentation.

Icon Menu Layout

Application programmers can control the menu interface through the menu settings. The menu system is built based on instructions in an XML file loaded from cvjs_setTopMenuXML().

Furthermore, application programmers can also turn off the CADViewer icon interface and the CADViewer page navigation modal, and use the API to access the CAD canvas through their own interface.

// Set Icon Menu Interface controls. Users can:
// 1: Disable all icon interfaces
// cvjs_displayAllInterfaceControls(false, "floorPlan"); // disable all icons for user control of interface
// 2: Disable either top menu icon menus or navigation menu, or both
// cvjs_displayTopMenuIconBar(false, "floorPlan"); // disable top menu icon bar
// cvjs_displayTopNavigationBar(false, "floorPlan"); // disable top navigation bar
// 3: Users can change the number of top menu icon pages and the content of pages, based on a configuration file in folder /cadviewer/app/js/menu_config/
// cvjs_setTopMenuXML("floorPlan", "cadviewerjs_menu_viewing_only.xml", "/app/cv/cv-core/menu_config/");
// cvjs_setTopMenuXML("floorPlan", "cadviewerjs_menu_all_items.xml", "/app/cv/cv-pro/menu_config/");
// cvjs_setTopMenuXML("floorPlan", "cadviewerjs_menu_all_items_startpage3.xml", "/app/cv/cv-pro/menu_config/");
cvjs_setTopMenuXML("floorPlan", "cadviewerjs_menu_all_items_custom_commands.xml", "/app/cv/cv-pro/menu_config/");

Methods to control visibility of the CADViewer Icon Interface. Click on the method to open the API documentation.

Method to control the layout of the CADViewer Icon Interface. Loads in the top icon menu system from an XML file The XML file. The XML file allows custom settings of the number of menu pages, the start menu page and content of each page, based on the selection set of available API commands. Click on the method to open the API documentation.

Sample XML Icon Menus

Below is a set of sample XML Icon Menus:

Viewing Only XML Icon Menu
cvjs>
<iconmenu>
<totalpages>1</totalpages>
<startpage>1</startpage>
<pages>
<page>
<command>cvjs_LayerList</command>
<command>cvjs_Print</command>
<command>cvjs_toggleBlackWhite</command>
<command>cvjs_setBackgroundColor</command>
<command>cvjs_interactiveSearchText</command>
<command>cvjs_interactiveLayerOff</command>
<command>cvjs_swapLayersInDrawing</command>
<command>cvjs_allLayersInDrawingOn</command>
<command>cvjs_Measurement</command>
<command>cvjs_calibrateMeasurement</command>
<command>cvjs_displayMagnifyingGlass</command>
<command>cvjs_activateLineThicknessModal</command>
</page>
</pages>
<icons_per_row>0</icons_per_row>
<icon_page_left_x>0</icon_page_left_x>
<icon_page_left_y>0</icon_page_left_y>
<customcommand>
<tooltip>Commmand tooltip 1</tooltip>
<tooltip>Commmand tooltip 2</tooltip>
<tooltip>Commmand tooltip 3</tooltip>
<tooltip>Commmand tooltip 4</tooltip>
<tooltip>Commmand tooltip 5</tooltip>
<tooltip>Commmand tooltip 6</tooltip>
<tooltip>Commmand tooltip 7</tooltip>
<tooltip>Commmand tooltip 8</tooltip>
<tooltip>Commmand tooltip 9</tooltip>
<tooltip>Commmand tooltip 10</tooltip>
</customcommand>
</iconmenu>
<zoommenu>
<location_left_x>0</location_left_x>
<location_left_y>36</location_left_y>
</zoommenu>
</cvjs>
Full XML Icon Menu Interface
<cvjs>
<iconmenu>
<totalpages>3</totalpages>
<startpage>1</startpage>
<pages>
<page>
<command>cvjs_LayerList</command>
<command>cvjs_Print</command>
<command>cvjs_toggleBlackWhite</command>
<command>cvjs_setBackgroundColor</command>
<command>cvjs_openFileLoadToServer</command>
<command>cvjs_interactiveSearchText</command>
<command>cvjs_interactiveLayerOff</command>
<command>cvjs_swapLayersInDrawing</command>
<command>cvjs_allLayersInDrawingOn</command>
<command>cvjs_Measurement</command>
<command>cvjs_calibrateMeasurement</command>
<command>cvjs_displayMagnifyingGlass</command>
<command>cvjs_activateLineThicknessModal</command>
<command>cvjs_About</command>
</page>
<page>
<command>cvjs_mergeDXFDWG</command>
<command>cvjs_publishPDF</command>
<command>cvjs_loadStickyNotesRedlinesUser</command>
<command>cvjs_saveStickyNotesRedlinesUser</command>
<command>cvjs_setRedlineColor</command>
<command>cvjs_setRedlineThickness</command>
<command>cvjs_drawStickyNote</command>
<command>cvjs_drawRedlineText</command>
<command>cvjs_drawRedline_Freehand</command>
<command>cvjs_drawRedlineEllipseCloud</command>
<command>cvjs_drawRedlineFilledPolygon</command>
<command>cvjs_drawRedlinePolyline</command>
<command>cvjs_drawRedlineFilledRectangle</command>
<command>cvjs_drawRedlineRectangle</command>
<command>cvjs_drawRedlineArrow</command>
<command>cvjs_deleteSingleRedline</command>
<command>cvjs_deleteLastRedline</command>
<command>cvjs_clearCurrentRedline</command>
</page>
<page>
<command>cvjs_insertImageLink</command>
<command>cvjs_loadAllImageLinks</command>
<command>cvjs_saveAllImageLinks</command>
<command>cvjs_clearAllImageLinks</command>
<command>cvjs_quickCount</command>
<command>cvjs_showMeCounts</command>
<command>cvjs_clearQuickCounts</command>
<command>cvjs_compareDrawings_LoadSecondDrawing</command>
<command>cvjs_compareDrawings_ToggleDrawings</command>
<command>cvjs_compareDrawings_ToggleDrawingOverlay</command>
<command>cvjs_exitCompareDrawings</command>
</page>
<page>
<command>cvjs_customCommand_03</command>
<command>cvjs_customCommand_04</command>
<command>cvjs_customCommand_01</command>
<command>cvjs_customCommand_02</command>
</page>
</pages>
<icons_per_row>0</icons_per_row>
<icon_page_left_x>0</icon_page_left_x>
<icon_page_left_y>0</icon_page_left_y>
<customcommand>
<tooltip>Commmand tooltip 1</tooltip>
<tooltip>Commmand tooltip 2</tooltip>
<tooltip>Commmand tooltip 3</tooltip>
<tooltip>Commmand tooltip 4</tooltip>
<tooltip>Commmand tooltip 5</tooltip>
<tooltip>Commmand tooltip 6</tooltip>
<tooltip>Commmand tooltip 7</tooltip>
<tooltip>Commmand tooltip 8</tooltip>
<tooltip>Commmand tooltip 9</tooltip>
<tooltip>Commmand tooltip 10</tooltip>
</customcommand>
</iconmenu>
<zoommenu>
<location_left_x>0</location_left_x>
<location_left_y>36</location_left_y>
</zoommenu>
</cvjs>
Full XML Icon Menu Interface with Custom Commands
<cvjs>
<iconmenu>
<totalpages>4</totalpages>
<startpage>1</startpage>
<pages>
<page>
<command>cvjs_LayerList</command>
<command>cvjs_Print</command>
<command>cvjs_toggleBlackWhite</command>
<command>cvjs_setBackgroundColor</command>
<command>cvjs_openFileLoadToServer</command>
<command>cvjs_interactiveSearchText</command>
<command>cvjs_interactiveLayerOff</command>
<command>cvjs_swapLayersInDrawing</command>
<command>cvjs_allLayersInDrawingOn</command>
<command>cvjs_Measurement</command>
<command>cvjs_calibrateMeasurement</command>
<command>cvjs_displayMagnifyingGlass</command>
<command>cvjs_activateLineThicknessModal</command>
<command>cvjs_About</command>
</page>
<page>
<command>cvjs_mergeDXFDWG</command>
<command>cvjs_publishPDF</command>
<command>cvjs_loadStickyNotesRedlinesUser</command>
<command>cvjs_saveStickyNotesRedlinesUser</command>
<command>cvjs_setRedlineColor</command>
<command>cvjs_setRedlineThickness</command>
<command>cvjs_drawStickyNote</command>
<command>cvjs_drawRedlineText</command>
<command>cvjs_drawRedline_Freehand</command>
<command>cvjs_drawRedlineEllipseCloud</command>
<command>cvjs_drawRedlineFilledPolygon</command>
<command>cvjs_drawRedlinePolyline</command>
<command>cvjs_drawRedlineFilledRectangle</command>
<command>cvjs_drawRedlineRectangle</command>
<command>cvjs_drawRedlineArrow</command>
<command>cvjs_deleteSingleRedline</command>
<command>cvjs_deleteLastRedline</command>
<command>cvjs_clearCurrentRedline</command>
</page>
<page>
<command>cvjs_insertImageLink</command>
<command>cvjs_loadAllImageLinks</command>
<command>cvjs_saveAllImageLinks</command>
<command>cvjs_clearAllImageLinks</command>
<command>cvjs_quickCount</command>
<command>cvjs_showMeCounts</command>
<command>cvjs_clearQuickCounts</command>
<command>cvjs_compareDrawings_LoadSecondDrawing</command>
<command>cvjs_compareDrawings_ToggleDrawings</command>
<command>cvjs_compareDrawings_ToggleDrawingOverlay</command>
<command>cvjs_exitCompareDrawings</command>
</page>
<page>
<command>cvjs_customCommand_01</command>
<command>cvjs_customCommand_02</command>
<command>cvjs_customCommand_03</command>
<command>cvjs_customCommand_04</command>
<command>cvjs_customCommand_05</command>
<command>cvjs_customCommand_10</command>
<command>cvjs_customCommand_14</command>
<command>cvjs_customCommand_16</command>
<command>cvjs_customCommand_20</command>
</page>
</pages>
<icons_per_row>0</icons_per_row>
<icon_page_left_x>0</icon_page_left_x>
<icon_page_left_y>0</icon_page_left_y>
<customcommand>
<tooltip>Command Tooltip 1</tooltip>
<tooltip>Command Tooltip 2</tooltip>
<tooltip>Command Tooltip 3</tooltip>
<tooltip>Command Tooltip 4</tooltip>
<tooltip>Command Tooltip 5</tooltip>
<tooltip>Command Tooltip 6</tooltip>
<tooltip>Command Tooltip 7</tooltip>
<tooltip>Command Tooltip 8</tooltip>
<tooltip>Command Tooltip 9</tooltip>
<tooltip>Command Tooltip 10</tooltip>
<tooltip>Command Tooltip 11</tooltip>
<tooltip>Command Tooltip 12</tooltip>
<tooltip>Command Tooltip 13</tooltip>
<tooltip>Command Tooltip 14</tooltip>
<tooltip>Command Tooltip 15</tooltip>
<tooltip>Command Tooltip 16</tooltip>
<tooltip>Command Tooltip 17</tooltip>
<tooltip>Command Tooltip 18</tooltip>
<tooltip>Command Tooltip 19</tooltip>
<tooltip>Command Tooltip 20</tooltip>
</customcommand>
</iconmenu>
<zoommenu>
<location_left_x>0</location_left_x>
<location_left_y>36</location_left_y>
</zoommenu>
</cvjs>
Last updated on 9 Apr 2020
Published on 9 Apr 2020