This user-defined function is invoked when users select a folder. Implement this function to return the ID of the main tag object associated with the active folder. If this function returns the ID of an existing document of the document type that is specified for the Object document type option on the AMM Settings tab, then the Where Used property page of the main tag object is shown for the active folder.
Function AMMMainTagDocumentId ()
This function accepts no parameters.
The following example merely returns the first tag document found in the active folder. The function can be implemented with different search criteria to return a more specific tag document.
Function AMMMainTagDocumentId () Dim Criteria Dim FolderDocuments Criteria = Array(Array _ 'Internal name of the Parent Folder ID property ("AMDocumentPropertySet.*XC4800881716f11d1b47b000000000000%", _ IC_OP_EQUALS, Folder.ID)) 'Search in the folder Set FolderDocuments = Vault.FindDocuments(,Array("TagObject"), Criteria, False) If FolderDocuments.Count > 0 Then 'Return the first document ID 'Your implementation should return the document ID 'that meets your requirements AMMMainTagDocumentId = FolderDocuments.Document(0).ID End If End Function
Related concepts
Configuring linking to folders
Related tasks
Configuring the proxy document type
Configuring the Where Used page
Related information
AMMPropertiesToBeRequested function
PnIDLink_GetSheetSize function
PnIDLink_GetAssetCoordinates function
PnIDLink_IsMainDrawing function