Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hello, adding to the excellent contribution of @JhoelForshav , can you add the instruction try - catch - end try?
You could add it if you don't have an "on error resume next" line before

 

bRows = oBOMView.BOMRows
For Each bRow In bRows

	Dim rDoc As Document,docPropertySet As PropertySet,customPropSet As PropertySet
	rDoc = bRow.ComponentDefinitions.Item(1).Document
	
	docPropertySet = rDoc.PropertySets.Item("Design Tracking Properties")

	xlWorksheet.Range("A" & Row).Value = bRow.ItemNumber
	xlWorksheet.Range("C" & Row).Value = docPropertySet.Item("Part Number").Value
	xlWorksheet.Range("D" & Row).Value = docPropertySet.Item("Description").Value
	xlWorksheet.Range("E" & Row).Value = bRow.ItemQuantity
	xlWorksheet.Range("F" & Row).Value = docPropertySet.Item("Vendor").Value
	xlWorksheet.Range("P" & Row).Value = docPropertySet.Item("Cost").Value
	
	Try
	customPropSet = rDoc.PropertySets.Item("Inventor User Defined Properties")
	'xlWorksheet.Range("Q" & Row).Value = customPropSet.Item("Welding").Value 'If you want True/False
	xlWorksheet.Range("Q" & Row).Value = customPropSet.Item("Welding").Expression 'If you want Yes/No
	Catch
	End Try
Next

 I hope this helps with your problem. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn