Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exportar Static Quantity da BOM para o Excel

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
celesiob
891 Views, 5 Replies

Exportar Static Quantity da BOM para o Excel

Olá, 

Estou usando o seguinte código ilogic para exportar a quantidade de itens da BOM para o excel:

 

.ActiveCell.Value = ThisBOM.CalculateQuantity("Parts Only", ShortName)

 

porem esse código recalcula a BOM e somente exporta a quantidade real de componentes que estão inseridas no desenho...

 

minha necessidade é que exporte o valor editado ou seja  Static Quantity se alguém souber fico grato.

5 REPLIES 5
Message 2 of 6
xiaodong_liang
in reply to: celesiob

Hi,

 

Could you write the question in English? I am afriad not many peers are familar in the language you wrote in. Thank you! 

 

or you may search with the keywords "Export BOM Excel" if there is any existing posts.

Message 3 of 6
nagwani
in reply to: xiaodong_liang

Below is english version of query

 

Hello,
I am using the following code to export the iLogic amount of BOM items to excel:
 
. ThisBOM.CalculateQuantity ActiveCell.Value = ("Parts Only", ShortName)
 
put this code recalculates the BOM and only exports the actual quantity of components that are embedded in the design ...
 
My need is to export the edited value or Static Quantity if anyone knows I am grateful.

Message 4 of 6
xiaodong_liang
in reply to: celesiob

Hi,

 

I did not find a direct way of iLogic. But the Inventor API can access it. the code below can run in iLogic. It dumps the edited quantity of the first row of the first bomview.

 

Dim oBom
quantity  = ThisApplication.ActiveDocument.ComponentDefinition.BOM.BomViews(1).BomRows(1).TotalQuantity 
MsgBox(quantity )

 

thanks Adam's translation.

Message 5 of 6

Our engineer team confirmed that you would have to use the Inventor API BOMRow.TotalQuantity  property to read back the overridden quantity.  The CalculateQuantity function is specifically intended to recalculate the quantity without any override.

Message 6 of 6
celesiob
in reply to: celesiob

Solved with the suggestion of  xiaodong.liang

 

thank you.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report