Actify

AutoGraph International

Enigma

Geomodeling Tech. Corp.

GeoPLUS

Halliburton

Hewlett-Packard (HP)

Logistics Business Systems

Lexco Data Systems

Lexmark International

Fugro-Jason

Production Geoscience Ltd.

PTC/Arbortext

Seismic Micro-Technology

Schlumberger

Star AG

Plus many more...

sales@cgmlarson.com
Request Evaluation
Phone: (+1) 713-977-4177

CGM Viewer Control


HTML Example with VB Scripting

  <HTML>
<HEAD>
<TITLE>CGM Drawing</TITLE>
</HEAD>
<BODY>
<OBJECT ID= mycgm WIDTH=800 HEIGHT=500
CLASSID= "CLSID:2FA0A680-F4D3-11D2-BD9C-0000B436855E">
<PARAM NAME= "SRC" VALUE="c:\projects\R300-20.cgm">
</OBJECT>

<script language="VBScript">
mycgm.ConfigMarkups(true)

function print()
mycgm.print()
end function

function refresh()
mycgm.refresh()
end function

function toolbar()
mycgm.showhidetoolbar()
end function

function zoomup()
mycgm.zoom("up")
end function

function zoomdown()
mycgm.zoom("down")
end function

</script>

<p>
<input type=button name=clickthis value=print onclick="print()">
<input type=button name=clickthis value=refresh onclick="refresh()">
<input type=button name=clickthis value=toolbar onclick="toolbar()">
<input type=button name=clickthis value=zoomup onclick="zoomup">
<input type=button name=clickthis value=zoomdown onclick="zoomdown">
</p>
</BODY>

Properties:

CgmPath: specifies full path of the CGM file to be displayed
Horizontal Alignment: picture alignment in the target window
Mapping: controls how the picture will be scaled to fit the control window
NumberObjects: Get the number of objects (hotspots) contained in CGM.
ObjectId(position): Get the id object specified by position, a zero based index.
PictureNum: Picture number to display
PictureRotation: Rotate the picture 0, 90, 180 or 270 degrees.
Vertical Alignment: picture alignment in the target window
Viewport(topx topy botx boty[%]): Viewport to be used to display the CGM
ZoomPanMode: Zoom or Pan mode

Methods:

ConfigMarkups(disable): Disable Markups
ConfigMenu(disable): Disable the context menu (right click)
ConfigToobar(disable): Disable(true) toolbar
HighlightObject(id): highlight the object(hotspot) specified by “id”.
Page(direction): Page the picture in the specified direction
Print: Prints CGM to printer specified by the last PrintSetup.
PrintSetup: Invoke Printer setup dialogue box.
Refresh(): Redraw the CGM picture
SaveMarkups(save): Saves or restores user markups
ShowHideToolbar(): Show or Hide the toolbar.
Zoom(updown): Zoom the CGM picture “up” or “down” by 2X.

Events:

OnClickObject(id): when users clicks on an object(hotspot)
OnMouseOverObject(id): when mouse moves over an object(hotspot)
OnUserPage(direction): when users pages in specified “direction”
OnUserPan(): when the users pans the picture.
OnUserZoom(updown): when users zooms


Previous Page <<

Return to SDK Overview