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: 

Renumber Balloons for iLogic... continued

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
554 Views, 1 Reply

Renumber Balloons for iLogic... continued

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.

1 REPLY 1
Message 2 of 2
adam.nagy
in reply to: Anonymous

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!



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report