- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
A few things I see.
This is incorrect, this is an API object mixed with an ilogic function for iproperties. You will need to stick with the API versions a list is here in this article.
assemblyDef.iProperties.Value(docFName, "Project", "Authority") Doc file is declared as a part Document but when looping through all referenced documents you will come across both assembly documents and part documents.
Dim docFile As PartDocument
So you will need to be more generic at the beginning then use a filter like
If docFile.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
End If
A few more questions:
Where in the drawing do you want the number put? You could try a different approach and extract the part qty either from the partslist object or the BOM Object. Both of which should give you total qty's once you filter by the target part.
If you want to stay with the assembly, are you putting the qty in a parameter of the Main assembly or an iProperty? What is your search criteria for the parts to be counted?
Or if this helped you, please, click (like)
Regards
Alan