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: 

Compare assemblies with VBA

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
461 Views, 2 Replies

Compare assemblies with VBA

Hi!

 

I use Inventor + Vault 2018.3

 

I would like to automatically compare 2 assemblies with 2 different versions that are stored in Vault (basically I want to know what has been modified inside "ASMtest.iam" version 6 and 9 by my other colleagues).
What I manually do today inside Inventor is:
- get from Vault ASMtest version 6 (I do not open it inside Inventor)
- open a new part
- "derive" the ASMtest.iam, option "derive style = single solid body merging out seams between planar faces"
- break the link
- get from Vault ASMtest version 9 (I do not open it inside Inventor)
- "derive" the ASMtest.iam, option "derive style = single solid body merging out seams between planar faces"
--> at this step I get 2 solids, each represents a version of my ASMtest

And this is what shows me what was removed or added, for each I look which material is still there and I check the body weight/volume:
- "combine", option "cut", for base I select the 1st body and for toolbody I select the 2nd body
- "combine", option "cut", for base I select the 2nd body and for toolbody I select the 1st body


So, if I want to automate this comparison:
- Is there already an easiest way to do that ?
- should I do it with macro/VBA (I never used it inside Inventor, but I already use VBA inside Excel, and I found how to derive)
- should I do it with VB.net (I only know how to get the 2 versions of ASMtest.iam and parts which are inside, but I don't know how to create a new part and derive, combine, ...) --> I fear this will cost me a lot of time
- (I also can launch a VB.NET software to download the files, and then launch manually a macro to derive and combine, it can be sufficient for me)

 

It would be great if you can help me regarding the commands to use 🙂

 

Thanks a lot !

Labels (3)
2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: Anonymous

Hi,

sometime a go i wrote a blog post about comparing 2 parts. Maybe its a start for you. check my post "Compare Part Geometry with iLogic"

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
Anonymous
in reply to: JelteDeJong

Hi!

 

That sounds very interesting :), thank you!

But when  run it for a test (without modifying anything) I get an error "Paramètre incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))".

It appears inside "createDiff", when the following line is run:

doc.ComponentDefinition.Features.SplitFeatures.TrimSolid(splitTool, body, True)

 

For my test I tried to compare 2 solid parts.

 

Any idea of what happens?

 

 

 

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

Post to forums  

Autodesk Design & Make Report