Hi all,
I used the modified version of this rule, posted here:
Renumber Balloons for iLogic
for some testing reasons. If an assembly contains a subassemby, the following message appears:
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartComponentDefinition'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{DA33F1A3-7C3F-11D3-B794-0060B0F159EF}' failed due to the following error: Schnittstelle nicht unterstützt (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at p.b(String A_0)
Does anyone have a suggestion or the same problem or better a solution for it?
All I want to achieve is that this code renumbers separate part (current situation) and assembly files against the assembly BOM.
Thanks in advance.
Solved! Go to Solution.
Solved by adam.nagy. Go to Solution.
Hi there,
Looking at the code, you might just have to replace this:
Dim partDef As PartComponentDefinition
with this:
Dim partDef As ComponentDefinition
Could you give that a try?
______________________________________________________________
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!