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: 

Export Bom with ilogic or the API

2 REPLIES 2
Reply
Message 1 of 3
theo.bot
1410 Views, 2 Replies

Export Bom with ilogic or the API

Dear,

I've been working for a while with ilogic and it works great for modeling my assembly configuration.
Now i have one BIG problem with exporting the BOM of my assembly.
In ilogic there is a snippet called "export BOM", but it doesn't work if an LOD of your assembly is active.
But if you want to suppress part for the configuration this LOD is necessary.
Ilogic will change the BOM setting for suppressed parts to reference. This will help to create a correct BOM.

If I open the BOM when my LOD is active It's possible to do an export manually. But when I do it with an ilogic rule ( even the API) an error message appeared :

" ThisBOM: Could not find a BOM view named Structured

Please enable this BOM view, and save the assembly"

the detailed information of this error:

System.ArgumentException: ThisBOM: Could not find a BOM view named Structured

Please enable this BOM view, and save the assembly ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)

at Inventor.BOMViews.get_Item(Object Index)

at iLogic.CadBom.a(String A_0)

--- End of inner exception stack trace ---

Server stack trace:

at iLogic.CadBom.a(String A_0)

at iLogic.CadBom.Export(String viewName, String fileName, FileFormatEnum fileFormat, String sheetName)

at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)

at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

at Autodesk.iLogic.Interfaces.ICadBom.Export(String viewName, String fileName, FileFormatEnum fileFormat, String sheetName)

at LmiRuleScript.Main()

at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)

at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)

at Autodesk.iLogic.Exec.AppDomExec.ExecCodeInOtherDomain(AppDomain otherDomain, String assemName)

at e.a(String A_0)

I've checked if the BOM view was active and also checked the name of the bom view. We've tested it with differend assemblies and it never works.

It's only working if Your LOD is "Master"

Is this a bug in the system? Please Help

Kind regard,

Theo Bot

2 REPLIES 2
Message 2 of 3
MjDeck
in reply to: theo.bot

This is a limitation of ThisBOM.Export. It is documented in the iLogic help. You could call it a defect. We hope to be able to change this behavior in a future revision.

The workaround is to only use this function when you are in the Master Level of Detail. This can be a problem if you want a fully automated process, but it works.

Mike Deck
Autodesk

Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 3
Anonymous
in reply to: theo.bot

Do you know when this feature is going to be available?

 

I'm trying to get the BOM for iLogic LOD and seems impossible. Thanks

 

Any ideas?

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

Post to forums  

Autodesk Design & Make Report