AutoShow

The AutoShow property corresponds to Auto show document option available on Behaviour tab of the Options dialog.

Syntax:

HDoc.AutoShow [ = fNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

fNewValue

An Boolean expression that evaluates to new value of AutoShow property

AutoTarget

The AutoTarget property corresponds to Auto target object selection option available on Behaviour tab of the Options dialog.

Syntax:

HDoc.AutoTarget [ = fNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

fNewValue

A Boolean expression that evaluates to new value of AutoTarget property

CurrentIniFileName

Returns path name of current HyperDoc INI file.

Syntax:

HDoc.CurrentIniFileName

HDoc

An object expression that evaluates to a HyperDoc application object

CurrentObjectMarking

The CurrentObjectMarking property corresponds to Current object marking option available on Behaviour tab of the Options dialog.

Syntax:

HDoc.CurrentObjectMarking [ = fNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

fNewValue

A Boolean expression that evaluates to new value of AutoTarget property

CurrentUser

Returns the name of current HyperDoc database user.

Syntax:

HDoc.CurrentUser

HDoc

An object expression that evaluates to a HyperDoc application object

DocMode

The DocMode property defines mode of displaying Document List.

Syntax:

HDoc.DocMode [ = iNewDocMode]

HDoc

An object expression that evaluates to a HyperDoc application object

iNewDocMode

An integer expression that evaluates to new value of DocMode property

Remarks

Valid values of iNewDocMode parameter are the following:

DynamicObjectSet

The DynamicObjectSet property corresponds to Dynamic object set option available on Behaviour tab of the Options dialog.

Syntax:

HDoc.DynamicObjectSet [ = fNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

fNewValue

A Boolean expression that evaluates to new value of AutoTarget property

HDoc

Returns the password for current HyperDoc database user.

Syntax:

HDoc.CurrentPwd

HDoc

An object expression that evaluates to a HyperDoc application object

Initialized

Returns HyperDoc initialization status.

Syntax:

HDoc.Initialized

HDoc

An object expression that evaluates to a HyperDoc application object

MainForm

Returns HyperDoc main form object.

Syntax:

HDoc.MainForm

HDoc

An object expression that evaluates to a HyperDoc application object

Remarks

The HyperDoc main form object is exposed for unexpected purposes. Use it very cautiously.

PrintTemplate

Path to default print template file

Syntax:

HDoc.PrintTemplate [ =  sNewValue]

Hdoc

An object expression that evaluates to a HyperDoc application object

sNewValue

A string expression that evaluates to path name of default print template file

Remarks

Template file is a Tessel Vector File (*.TVD) created with Template Editor.

SymbolLibrary

Path name of symbol library file.

Syntax:

HDoc.SymbolLibrary [ = sNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

sNewValue

A string variable that evaluates to path name of symbol library file

SymbolLibraryObj

Object containing symbol library.

Syntax:

[Set] HDoc.SymbolLibraryObj[ = oNewValue]

HDoc

An object expression that evaluates to a HyperDoc application object

oNewValue

An object variable that evaluates to symbol library object

GetProfileString

Returns value of a profile string from the current HyperDoc INI file.

Syntax:

HDoc.GetProfileString(sSection, sKey, sDefaultValue)

HDoc

An object expression that evaluates to a HyperDoc application object

sSection

A string expression that evaluates to name of Section in INI file

sKey

A string expression that evaluates to name of Key in INI file

sDefaultValue

A string expression that evaluates to default value of profile string

Init

Initializes HyperDoc. It returns True if HyperDoc initialized successfully, otherwise returns False.

Syntax:

HDoc.Init(sIniFileName, sLoginName, sPassword, vUseInitialDoc)

HDoc

An object expression that evaluates to a HyperDoc application object

sIniFileName

A string expression that evaluates to a full path name of an INI file

sLoginName

A string expression that evaluates to a database login name

sPassword

A string expression that evaluates to a database password

Optional vUseInitialDoc

A variant expression that evaluates to a Boolean flag indicating, if initial document should be loaded on start up. Defaults to False when omitted

Remarks

RefreshView

RefreshView method forces updating HyperDoc windows contents. All HyperDoc caches are cleared before, to synchronize with up to date database contents. Useful when data in the database was changed outside of HyperDoc while HyperDoc was running.

Syntax:

HDoc.RefreshView() 

HDoc

An object expression that evaluates to a HyperDoc application object

RegisterDocumentFormHandler

Registers supplied object as a handler for document editing operations.

Syntax:

fRes = HDoc.RegisterDocumentFormHandler(iDTID, oEditForm)

fRes

The RegisterDocumentFormHandler method returns True when succeeded and False when failed.

HDoc

An object expression that evaluates to a HyperDoc application object

iDTID

An integer expression that evaluated to a valid document type ID

oEditForm

An object expression that evaluates to a handler object

Remarks

The object passed in oEditForm parameter must implement the following two functions:

Function Edit(DocID As Variant, fReadOnly As Boolean) As Boolean

DocID

The ID of the document to be edited

fReadOnly

This parameter is True when the user does not have rights to modify documents. In this case the object should NOT let the user modify the document data

Remarks

This method will be called on the object when the user selects Edit/View menu item for the document of the type specified in RegisterDocumentFormHandler call. The object is responsible for showing the user interface and modifying the database in appropriate way. It should return True when this operation succeeds and False when it fails (e.g. the user has cancelled the dialog).

Function AddNew(ByRef NewDocID As Variant) As Boolean

NewDocID

The ID of the new document

Remarks

This method will be called on the object when the user selects New XXX menu item for the document of the type specified in RegisterDocumentFormHandler call. The object is responsible for showing the user interface and modifying the database in appropriate way. It should return True when this operation succeeds and False when it fails (e.g. the user has cancelled the dialog). When the operation succeeds the NewKeyValue parameter should be set the ID value of the new document.

RegisterNotificationObject

Registers given notification object that will be called by HyperDoc to signal various events.

Syntax:

fRes = HDoc.RegisterNotificationObject(oNotifObj, sObjID)

fRes

The RegisterNotificationObject method returns True when succeeded and False when failed

HDoc

An object expression that evaluates to a HyperDoc application object

oNotifObj

An object expression that evaluates to a notification object

sObjID

A string expression that evaluates to a notification object identifier

RegisterObjectFormHandler

Registers supplied object as a handler for object editing operations for objects of the specified type.

Syntax:

fRes = HDoc.RegisterObjectFormHandler(sObjectClass, oEditForm)

fRes

The RegisterObjectFormHandler method returns True when succeeded and False when failed

HDoc

An object expression that evaluates to a HyperDoc application object

sObjectClass

A string expression that identifies a business object class

oEditForm

An object expression that evaluates to a handler object

Remarks

The object passed in oEditForm parameter must implement the following two methods:

Function Edit(KeyValue As Variant, fReadOnly As Boolean) As Boolean

KeyValue

Primary key value of the business object to be edited

fReadOnly

This parameter is True when the user does not have rights to modify business objects. In this case external application should NOT let the user modify the business object data

Remarks

This method will be called on the object when the user selects Edit/View menu item for the business object of the object class specified in RegisterObjectFormHandler call. The object is responsible for showing the user interface and modifying the database in appropriate way. It should return True when this operation succeeds and False when it fails (e.g. the user has cancelled the dialog).

Function AddNew(KeyValue As Variant, By Ref NewKeyValue As Variant) As Boolean

KeyValue

The foreign key value for the business object to be created

NewKeyValue

The primary key value of the new business object

Remarks

This method will be called on the object when the user selects New XXX menu item for the business object of the object class specified in RegisterObjectFormHandler call. The object is responsible for showing the user interface and modifying the database in appropriate way. It should return True when this operation succeeds and False when it fails (e.g. the user has cancelled the dialog). When the operation succeeds the NewKeyValue parameter should be set the primary key value of the new business object.

UnRegisterNotificationObject

Unregisters given notification object.

Syntax:

fRes = HDoc.UnRegisterNotificationObjectUnRegisterNotificationObject

fRes

The UnRegisterNotificationObject method returns True when succeeded and False when failed

HDoc

An object expression that evaluates to a HyperDoc application object

sObjID

A string expression that evaluates to notification object identifier

AddNewDocument

Adds new document to HyperDoc database.

Syntax:

iRes = HDOc.AddNewDocument(vDocID, lDocTypeID)

iRes

The method returns integer value:

0 - success,

1 - document already exists,

2 - illegal document type,

3 - index collision

4 - access denied

5 - locked

6 - other database error.

HDoc

An object expression that evaluates to a HyperDoc application object

vDocID

A variant expression that evaluates to a document identifier

lDocTypeID

A long expression that evaluates to a document type identifier

AttachDocumentFile

Attach document file to document identified by DocID parameter.

Syntax:

fRes = HDoc.AttachDocumentFile(DocID, DocumentName, VersionName, DocumentFile)

fRes

The method returns integer value:

0 - success,

1 - failure,

HDoc

An object expression that evaluates to a HyperDoc application object

DocID

A variant expression that evaluates to a document identifier

DocumentName

A string expression that will be assigned to the document name

VersionName

A string expression that will be assigned to the name of the first version of this document

DocumentFile

A string expression that evaluates to document file full path name

CopyDocumentContents

Copy document file.

Syntax:

Res = HDoc.CopyDocumentContents(DocID, sSrcDocDir, sDstDocDir)

Res

The method returns long value:

0 - success

non-zero otherwise

HDoc

An object expression that evaluates to a HyperDoc application object

DocID

A variant expression that evaluates to a document identifier

sSrcDocDir

A string expression that evaluates to source document directory

sDstDocDir

A string expression that evaluates to destination document directory

Remarks

The last two parameters are full path names to two distinct main logical device directories (those with subdirectories named like 19970620).

DoesDocumentExist

Checks if document exists.

Syntax:

fRes = HDoc.DoesDocumentExist(vDocID)

fRes

The DoesDocumentExist method returns True if document exists, False otherwise

HDoc

An object expression that evaluates to a HyperDoc application object

vDocID

A variant expression that evaluates to a document identifier

GetCurrentDocument

Returns Variant containing current document identifier.

Syntax:

HDoc.GetCurrentDocument()

HDoc

An object expression that evaluates to a HyperDoc application object

RemoveDocumentFile

Remove document file from HyperDoc Document Store

Syntax:

HDoc.RemoveDocumentFile(DocID)

HDoc

An object expression that evaluates to a HyperDoc application object

DocID

A variant expression that evaluates to a document identifier

SetCurrentDocument

Sets the document with given ID as the current one (and shows it according to the current HyperDoc state).

Syntax:

fRes = HDoc.SetCurrentDocument(DocID, fAutoDefault)

fRes

The SetCurrentDocument method returns True when succeeded and False when failed

HDoc

An object expression that evaluates to a HyperDoc application object

DocID

A variant expression that evaluates to a document identifier

fAutoDefault

This argument is ignored

SetCurrentDocumentEx

Sets the document with given ID as the current one using supplied document and object identification.

Syntax:

Res = HDoc.SetCurrentDocumentEx(ObjectClass, KeyValue, DocID, fObjFound)

Res

The SetCurrentDocumentEx method returns True

HDoc

An object expression that evaluates to a HyperDoc application object

ObjectClass

A string expression that identifies a business object class

KeyValue

A variant expression that identifies a particular object of the given class

DocID

A variant expression that evaluates to a document identifier

fObjFound

A Boolean expression that indicates if ObjectClass and KeyValue parameters are to be used for selecting business object to be used as a context for showing the given document

CreateObjectID

Create object of ObjectID type that can identify business object.

Syntax:

Set Res = HDoc.CreateObjectID()

Res

Name of the object variable to receive a reference to object that identifies business object (see Remarks for description of ObjectID type)

HDoc

An object expression that evaluates to a HyperDoc application object

Remarks

A business object is identified by a name of object class and unique key value. The object of ObjectID type stores above values in the following properties:

Some HyperDoc API functions expect that business object is identified by object of ObjectID type.

GetCurrentObject

Retrieves identification of the current object shown in Hierarchy Window.

Syntax:

HDoc.GetCurrentObject(ObjectClass, KeyValue)

HDoc

An object expression that evaluates to a HyperDoc application object

ByRef

Reference to a string for the current object class name

ObjectClass

A string expression that evaluates to a business class name

ByRef

Reference to a variant for the current object identification

KeyValue

A variant expression that evaluates to a business object identification

GetMarkedStatus

Get marked status of given object.

Syntax:

iRes = HDoc.GetMarkedStatus(ObjectClass, KeyValue)

iRes

The GetMarkedStatus method returns long value as described below

HDoc

An object expression that evaluates to a HyperDoc application object

ObjectClass

A string expression that evaluates to a business class name

KeyValue

A variant expression that evaluates to a business object identification

Remarks

Return values are the following:

MarkObject

Mark given object in the Hierarchy Window.

Syntax:

HDoc.MarkObject(ObjectClass, KeyValue, fWithChildren)

HDoc

An object expression that evaluates to a HyperDoc application object

ObjectClass

A string expression that evaluates to a business class name

KeyValue

A variant expression that evaluates to a business object identification

fWithChildren

A Boolean expression indicating if the object is to be marked with its children

ResetMarked

Unmark all marked objects.

Syntax:

HDoc.ResetMarked()

HDoc

An object expression that evaluates to a HyperDoc application object

SetCurrentObject

Set current object in Hierarchy Window

Syntax:

HDoc.SetCurrentObject(ObjectClass, KeyValue)

HDoc

An object expression that evaluates to a HyperDoc application object

ObjectClass

A string that evaluates to a business class name

KeyValue

A variant expression that evaluates to a business object identification

UnmarkObject

Unmark given object in the Hierarchy Window.

Syntax:

HDoc.UnmarkObject(ObjectClass, KeyValue)

HDoc

An object expression that evaluates to a HyperDoc application object

ObjectClass

A string expression that evaluates to a business class name

KeyValue

A variant expression that evaluates to a business object identification

Add

Adds business object to the object set.

Syntax:

OSet.Add(sObjCls, vKeyVal, fWithChildren)

OSet

An object expression that evaluates to an ObjectSet object

sObjCls

A string that evaluates to a business class name

vKeyVal

A variant expression that evaluates to business object identification

fWithChildren

This parameter is ignored in the context of HyperDoc API

AddObject

Adds business object to object set.

Syntax:

OSet.AddObject(ObjID, fWithChildren)

OSet

An object expression that evaluates to an ObjectSet object

ObjID

A object expression that evaluates to a business object identifier (see description of ObjectID type above)

fWithChildren

This parameter is ignored in the context of HyperDoc API

BOF

Checks if current object pointer is before the first object in the object set.

Syntax:

Res = OSet.BOF()

Res

The BOF method returns:

True - current object pointer is before first object in object set

False - current object pointer is not before first object in object set

OSet

An object expression that evaluates to an ObjectSet object.

CreateDocSet

Create empty document set (object of type DocumentSet).

Syntax:

Set Res = HDoc.CreateDocSet()

Res

Name of the object variable to receive a reference to new document set

HDoc

An object expression that evaluates to a HyperDoc application object

CreateObjectSet

Creates empty object set (object of type ObjectSet).

Syntax:

Set Res = HDoc.CreateObjectSet()

Res

Name of the object variable to receive a reference to new object set

HDoc

An object expression that evaluates to a HyperDoc application object

DBOSS

Returns current HyperDoc object set.

Syntax:

Set oObjSet = HDoc.DBOSS

HDoc

An object expression that evaluates to a HyperDoc application object

Dirty

Returns or sets a value that determines whether the object set has been changed since recent load or save operation.

Syntax:

OSet.Dirty [ = bDirty]

OSet

An object expression that evaluates to an ObjectSet object

bDirty

A Boolean expression that evaluates to new value of Dirty property

EOF

Checks if current object pointer is after the last object in the object set.

Syntax:

Res = OSet.EOF()

Res

The EOF method returns:

True - current object pointer is after last object in object set

False - current object pointer is not after last object in object set

OSet

An object expression that evaluates to an ObjectSet object.

GetCount

Returns number of objects in the object set.

Syntax:

Res = OSet.GetCount()

Res

The GetCount returns number of objects in object set as long value

OSet

An object expression that evaluates to an ObjectSet object.

GetCurrent

Gets reference to the current object in the object set.

Syntax:

Set Res = OSet.GetCurrent()

Res

Name of the object variable to receive a reference to object set member (see Remarks)

OSet

An object expression that evaluates to an ObjectSet object.

Remarks

An object set member is of type ObjInSet and it stores the following data:

The m_ObjID property identifies business object, which belong to object set (see description of ObjectID type). The m_fWithChildren is a copy of fWithChildren parameter of Add and AddObject methods, otherwise not used in the context of HyperDoc API.

GetLinkedObjectSetID

Get identifier of object set linked to given business object.

Syntax:

Res = HDoc.GetLinkedObjectSetID(ObjID)

Res

The GetLinkedObjectSetID method returns object set identifier as long value (0 if no object set is linked to given object)

HDoc

An object expression that evaluates to a HyperDoc application object

ObjID

A object expression that evaluates to a business object identifier (see description of ObjectID type)

LinkObjectSet2Object

Links object set to business object.

Syntax:

Res = HDoc.LinkObjectSet2Object(ObjID, lSetID)

Res

The LinkObjectSet2Object method returns True if succeeded or False if failed

HDoc

An object expression that evaluates to a HyperDoc application object

ObjID

A object expression that evaluates to a business object identifier (see description of the ObjectID type)

lSetID

A long expression that evaluates to an object set identifier

Load

Load contents of object set.

Syntax:

Res = .Load(sName, sUserName, fPublic)

Res

The Load method returns integer value:

0 – OK

1 –object set does not exist

2 – Error while loading object set contents

OSet

An object expression that evaluates to an ObjectSet object

sName

A string expression that evaluates to object set name

sUserName

A string expression that evaluates to user name (see Remarks)

fPublic

Controls the kind of object set that will be loaded

Remarks

HyperDoc supports two types of Object Sets: Public, that are accessible to all users, and Private that are accessible only to a specific user.

MoveFirst

Moves current object pointer to the first object in the object set.

Syntax:

OSet.MoveFirst()

OSet

An object expression that evaluates to an ObjectSet object

MoveLast

Moves current object pointer to the last object in the object set.

Syntax:

OSet.MoveLast()

OSet

An object expression that evaluates to an ObjectSet object.

MoveNext

Moves current object pointer to the next object in the object set.

Syntax:

OSet.MoveNext()

OSet

An object expression that evaluates to an ObjectSet object.

MovePrevious

Moves current object pointer to the previous object in the object set.

Syntax:

OSet.MovePrevious()

OSet

An object expression that evaluates to an ObjectSet object.

ObjectSet_GenerateIDNew

Generate unique identifier for new object set.

Syntax:

Res = HDoc.ObjectSet_GenerateIDNew(sSetName, sUserName, fPublic)

Res

The ObjectSet_GenerateIDNew method returns identifier as long value

HDoc

An object expression that evaluates to a HyperDoc application object

sSetName

A string expression that evaluates to a object set name

sUserName

A string expression that evaluates to a HyperDoc User name

fPublic

Controls the kind of object set that will be created

Remarks

HyperDoc supports two types of Object Sets: Public, that are accessible to all users, and Private that are accessible only to a specific users.

ObjectSet_GetSetIDNew

Get identifier of given object set.

Syntax:

Res = HDoc.ObjectSet_GetSetIDNew(sSetName, sUserName, fPublic)

Res

The ObjectSet_GetSetIDNew method returns identifier as long value

HDoc

An object expression that evaluates to a HyperDoc application object

sSetName

A string expression that evaluates to a object set name

sUserName

A string expression that evaluates to a HyperDoc User name

fPublic

Controls the kind of object set of interest

Remarks

HyperDoc supports two types of Object Sets: Public, that are accessible to all users, and Private that are accessible only to a specific users.

ObjectSet_GetSetName

Get name of given object set.

Syntax:

Res = HDoc.ObjectSet_GetSetName(lSetID)

Res

The ObjectSet_GetSetName method returns object set name as string value or empty string if object set does not exist

HDoc

An object expression that evaluates to a HyperDoc application object

lSetID

A long expression that evaluates to an object set identifier

ParentObjectID

Returns or sets identifier of the business object linked to object set.

Syntax:

OSet.ParentObjectID [ = ParentObj]

OSet

An object expression that evaluates to an ObjectSet object.

ParentObj

An object expression that evaluates identifier of parent business object (see description of ObjectID type).

PublicOS

Returns or sets a value that determines whether the object set is Public or Private.

Syntax:

OSet.PublicOS [ = bNewValue]

OSet

An object expression that evaluates to an ObjectSet object.

An object expression that evaluates to an ObjectSet object.

A Boolean expression that evaluates to new value of PublicOS property.

Remove

Removes business object from the object set.

Syntax:

OSet.Remove(sObjCls, vKeyVal)

OSet

An object expression that evaluates to an ObjectSet object

sObjCls

A string that evaluates to a business class name

vKeyVal

A variant expression that evaluates to business object identification

RemoveAll

Removes all objects from the object set.

Syntax:

OSet.RemoveAll()

OSet

An object expression that evaluates to an ObjectSet object.

RemoveObject

Remove business object from the object set.

Syntax:

OSet.RemoveObject(ObjID)

OSet

An object expression that evaluates to an ObjectSet object.

ObjID

A object expression that evaluates to business object identifier (see description of ObjectID type above)

Save

Saves contents of object set.

Syntax:

Res = .Save 

Res

The Save method returns integer value:

0 – OK

1 – SetID property not initialized

2 – Error while saving object set contents

OSet

An object expression that evaluates to an ObjectSet object

SetID

Returns or sets unique identifier of object set.

Syntax:

OSet.SetID [ = lNewValue]

OSet

An object expression that evaluates to an ObjectSet object.

lNewValue

A long expression that evaluates to new value of SetID property.

InfoScope

Returns reference to Object InfoScope or Document InfoScope window

Syntax:

HDoc.InfoScope(Optional fDynamic As Boolean = False)

HDoc

An object expression that evaluates to a HyperDoc application object

fDynamic

False – return Object InfoScope window

True – return Document InfoScope window

ObjectInfoScope_AutoShow

Returns or sets the property that controls automatic displaying of documents attached to the current object in InfoScope Window.

Syntax:

HDoc.ObjectInfoScope_AutoShow [ = bNewValue]

Hdoc

An object expression that evaluates to a HyperDoc application object

bNewValue

A Boolean expression that evaluates to the new value of AutoShow property.

Remarks

If ObjectInfoScope_AutoShow property is TRUE than HyperDoc automatically finds a document attached to the clicked object or to its closest ancestor in the currently active hierarchy, such that the clicked object is represented on it.

SetCurrentObject

Sets the current object in Object InfoScope window.

Syntax:

InfoScope.(ObjID) 

InfoScope

An object expression that evaluates to an Object InfoScope Window object.

ObjID

An object expression that evaluates to business object identifier (see description of ObjectID type).

ShowDocumentInfoscope

Shows Document Infoscope window.

Syntax:

HDoc.ShowDocumentInfoscope(Optional iReqNumber As Integer = -1)

HDoc

An object expression that evaluates to a HyperDoc application object

iReqNumber

Sequential number of hierarchy to show; -1 causes standard dialog for hierarchy selection to pop up.

ShowObjectInfoscope

Shows Object InfoScope window.

Syntax:

HDoc.ShowObjectInfoscope(Optional iReqNumber As Integer = -1)

HDoc

An object expression that evaluates to a HyperDoc application object

iReqNumber

Sequential number of hierarchy to show; -1 causes standard dialog for hierarchy selection to pop up.

AddIn

Returns a reference to the specified add-in object.

Syntax:

Set Obj = HDoc.AddIn(sProgID)

Obj

Name of the object variable to receive a reference to the requested add-in object

HDoc

An object expression that evaluates to a HyperDoc application object

sProgID

A string expression that identifies the object class of the add-in. This is the same string that is used in the ProgID field of the HDocAddIns table

CustomMenuItem

A reference to the specified AddInMenuItem object. The AddInMenuItem object has the following properties:

AddInIndex

Integer

Add-in index

ItemID

String

Menu item ID

Caption

String

Menu item caption

Enabled

Boolean

Menu item enabled state

Visible

Boolean

Menu item visibility state

Checked

Boolean

Menu item checked state

Syntax:

Set Obj = HDoc.CustomMenuItem(Index, ID)

Obj

Name of the object variable to receive a reference to the requested menu item object

HDoc

An object expression that evaluates to a HyperDoc application object

Index

Add-in index. The add-in should pass the index value received in the Init event

ID

String that identifies the menu item

AddCustomMenuItem

Adds a menu item to the Add-Ins menu. The add-in will be notified when the user selects this menu item. See Custom menu handling section below for details. The menu item is initially enabled, visible and not checked. The caption and visual attributes of the menu item can be changed later by referring to the CustomMenuItem property.

Syntax:

HDoc.AddCustomMenuItem(Index As Integer, ID As String, _
                    Caption As String, _
                    Optional Picture As Object = Nothing, _
                    Optional sToolTip As String = "")

HDoc

An object expression that evaluates to a HyperDoc application object

Index

Add-in index. The add-in should pass the index value received in the Init event

ID

String that identifies the menu item. This string should be unique within the add-in.

Caption

Initial caption of the menu item.

Picture

An object expression that evaluates to a picture for this item.

sToolTip

String for tool tip.

AfterPrinting

Occurs after printing.

Syntax:

Sub AfterPrinting()
BeforePrinting

Occurs before printing.

Syntax:

Sub BeforePrinting()
ClosePrintPreview

Occurs after closing Print Preview.

Syntax:

Sub ClosePrintPreview()
ConnectDoc

Handles adding object – document connections (links).

Syntax:

Function ConnectDoc(ByVal ObjectClass As String, _
                      ByVal KeyValue As Variant, _
                      ByVal DocID As Variant) As Boolean

ObjectClass

A string expression that evaluates to a business class name.

KeyValue

A variant expression that evaluates to deleted business object identification

DocID

Document ID

<return value>

If False prevents given link to be created.

Remarks

You can use the ConnectDoc event for controlling object – document links creation. Returning False aborts link creation.

CurrentDocumentChanged

Occurs when current document in Document List Window changes.

Syntax:

Sub CurrentDocumentChanged(DocID As Variant)

DocID

A variant expression that evaluates to document identification.

CurrentObjectChanged

Occurs when current object in Hierarchy Window changes.

Syntax:

Sub CurrentObjectChanged (ObjectClass As String, PrimaryKeyValue As Variant)

ObjectClass

A string expression that evaluates to a business class name

PrimaryKeyValue

A variant expression that evaluates to a business object identification

DisconnectDoc

Handles removal of object – document connections (links).

Syntax:

Function DisconnectDoc(ByVal ObjectClass As String, _
                      ByVal KeyValue As Variant, _
                      ByVal DocID As Variant) As Boolean

ObjectClass

A string expression that evaluates to a business class name.

KeyValue

A variant expression that evaluates to deleted business object identification

DocID

Document ID

<return value>

If False prevents given link to be removed.

Remarks

You can use the DisconnectDoc event for controlling object – document links removal. Returning False aborts link removal.

DocTabChanged

Occurs when tab is changed in Document List Window.

Syntax:

Sub DocTabChanged(iTab As Integer)

iTab

Number of clicked tab

DocTabVisibilityChanged

Occurs when tab visibility status changes in Document List Window.

Syntax:

Sub DocTabVisibilityChanged(iTab As Integer, fShow As Boolean)

iTab

Number of tab.

fShow

Visibility state of this tab.

DocumentModified

Occurs when given document is modified.

Syntax:

Sub DocumentModified(DocID As Variant)

DocID

A variant expression that evaluates to a document identification

EndOfHDoc

Occurs in registered notification objects after HyperDoc closes.

Syntax:

Sub EndOfHDoc()

Remarks

Called to signal that HyperDoc is closed. External application must not call any HyperDoc methods – it can do its own cleanup.

FinalExit

Occurs before HyperDoc closes.

Syntax:

Sub FinalExit()

Remarks

Called to signal that HyperDoc is about to close.

Init

Initialize the add-in module. Returns True if initialization succeeded; False otherwise.

Syntax:

Function Init(Index As Integer, HDoc As Object) As Boolean

Index

The add-in index.

HDoc

The HyperDoc.Application object that refers to the running instance of HyperDoc

Remarks

Called on startup with HDoc set to the current running HyperDoc.Application object. The add-in should use the Index value in future communication with HyperDoc (e.g. when adding custom menu items).

NewObjectAdded

Occurs after adding new object/document.

Syntax:

Sub NewObjectAdded(ByVal ObjectClass As String, _
                      ByVal KeyField As String, _
                      ByVal PrimaryKeyValue As Variant)

ObjectClass

A string expression that evaluates to a business class name

KeyField

A string expression that evaluates to name of a key field

PrimaryKeyValue

A variant expression that evaluates to newly added business object identification.

NewObjectPrimaryKey

Allows handling generation of new object/document identification.

Syntax:

Sub NewObjectPrimaryKey(ByVal ObjectClass As String, _
                      ByVal KeyField As String, _
                      ByRef PrimaryKeyValue As Variant)

ObjectClass

A string expression that evaluates to a business class name

KeyField

A string expression that evaluates to name of a key field

PrimaryKeyValue

A variant that should be filled with valid new business object identification

Remarks

You can use the NewObjectPrimaryKey event for handling generation of new object/document identification. Externally generated primary key value should be returned in PrimaryKeyValue variable. This value will be used for newly added object.

ObjectDeleted

Occurs after object/document removal.

Syntax:

Sub ObjectDeleted(ByVal ObjectClass As String, _
                      ByVal KeyField As String, _
                      ByVal PrimaryKeyValue As Variant)

ObjectClass

A string expression that evaluates to a business class name

KeyField

A string expression that evaluates to name of a key field

PrimaryKeyValue

A variant expression that evaluates to deleted business object identification

OnIdle

Allows background processing in add-ins.

Syntax:

Sub OnIdle()

Remarks

Called to signal that HyperDoc enters idle state. Add-in can do its own idle processing here e.g. refreshing button state on toolbar or slow database reads.

PostInitPaperSpace

Occurs after printing initialization phase.

Syntax:

Sub PostInitPaperSpace(ByVal VectorDrw As Object)

VectorDrw

An ADrawing object that refers to the print template vector drawing.

Remarks

You can use the PostInitPaperSpace event to modify contents of a paper space drawing. The paper space drawing is initialized from current print template file.

PreInitPaperSpace

Occurs before loading print template drawing.

Syntax:

Sub PreInitPaperSpace(DocID As Variant)

DocID

A variant that identifies the document

Remarks

HyperDoc loads the print template drawing (if any) during print preview or print process startup. You can use the PreInitPaperSpace event to set your own print template file.

VectorEntityChanged

Occurs after modification of vector entity in active HyperView Window.

Syntax:

Sub VectorEntityChanged(VectorDrw As Object, VectorEntityId As Long)

VectorDrw

An ADrawing object that refers to the current vector drawing

VectorEntityId

An identifier of the changed vector entity

VectorObjectActivated

Occurs when spot is clicked in active HyperView Window.

Syntax:

Sub VectorObjectActivated(ByVal VectorDrw As Object, _
                            ByVal VectorObj As Object)

VectorDrw

An ADrawing object that refers to the current vector drawing.

VectorObj

An activated vector object.

loading table of contents...