The HOPAGetView4Object function allows putting the image prepared by HOPA on the HTML page.
Parameters of the HOPAGetView4Object function allows you control:
width and height of the image,
part of the original document used to prepare the image,
mask unnecessary parts of the document,
display documents with additional information generated by dynamic presentation.
The HOPA user has full control over positioning images on the HTML page. It is possible of course to compose multi-image HTML layout with any other graphical elements composed as desired.
...
<img name=”Pic1”
src=”HOPAGetView4Object.asp? ObjClass=Rooms& ID=Room002& Width=400& Height=300”
width=”400”
height=”300”>
...
This example shows simplest use of the API. The <img …> tag placed somewhere on a HTML page will contain view of the default document linked to object with HyperDoc class name “Rooms” and key value “Room001”. HyperDoc object class name is defined in default hierarchy definition for this database (i.e. in table “HDocHierarchyDefinition” column “ObjectClass” – please note that it is NOT “DisplayName”). There is no document linked to object “Room001” in the database, so the document for its spot is used.
...
<img name=”Pic2”
src=”HOPAGetView4Object.asp? ObjClass=Floors& ID=Floor001& FitMode=3& Height=300& UseView=0& Present=Room%20Status”
height=”300”>
...
Next example shows document linked to object with class name “Floors” and key value “Floor001”). Returned image will be generated from full drawing and will be 300 pixels tall – width will be adequate to preserve aspect ratio of image. Presentation called “Room status” will be applied. Please note that spaces characters are quoted (“%20”).
...
<img name=”Pic3”
src=”HOPAGetView4Object.asp? ObjClass=Floors& ID=Floor001& FitMode=2& Width=300& SpotMarginPercent=150”
width=”300”>
...
Next example shows how to obtain view of document containing spot for the same object (object class name “Floors” and key value “Floor001”). View has 50% margin surrounding spot – defining this parameter forces Document for Spot mode. Returned image will be 400 pixels wide – height will be adequate to preserve aspect ratio of image.