What you will need is to access the documents object and look for visible documents collection. Loop through this collection and then check the document type against an object type enumerator, you will find drawing "kDrawingDocumentObject" in that list. Then access the document object and look for fullfilename. Then access iproperties collection known as property sets then the custom iproperty property set known as "Inventor User Defined Properties" . Then retrieve the count per document of this custom iproperty.
Links for code creation from API help:
Documents object
Document Type
Object Type Enumerator
Document Object
Custom iProperty Sample
Property Set Count
Dim sList As New ArrayList
Dim opendoc As Document
For Each opendoc In ThisApplication.Documents.VisibleDocuments
If opendoc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
' Get the user defined (custom) property set.
Dim invCustomPropertySet As PropertySet
invCustomPropertySet = opendoc.PropertySets.Item("Inventor User Defined Properties")
sList.Add(opendoc.FullDocumentName & " - " & invCustomPropertySet.Count)' add to arraylist
End If
Next
Item = InputListBox("Prompt", sList,Item, Title := "Drawing List", ListName := "List")
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan