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

Accessing BOM Quantity Type Through Apprentice?

I have a program that loops through an assembly using component occurrences in Inventor. The following code to access the BOM Quantity Type works fine in Inventor: 

 

oOcc.Definition.BOMQuantity.GetBaseQuantity(out qType, out qQTY);

 

When I try to run the same code using Apprentice, I get the following error: (Exception from HRESULT: 0x80004001 (E_NOTIMPL))

 

Does anyone know if it is possible to access this property through apprentice? I have been able to access all other properties in the same way that I would with Inventor, until this error. 

 

Relevant section of code:

 

 

public void Loop(ComponentOccurrence oOcc)
{

BOMQuantityTypeEnum qType;
object qQTY;

oOcc.Definition.BOMQuantity.GetBaseQuantity(out qType, out qQTY);

}

 

 

C# as programming language

Autodesk Inventor 2019, Build: 330, Release: 2019.4.1

Tags (2)
Labels (1)