Talking to Inventor from VBA "Replace Component"

This widget could not be displayed.

Talking to Inventor from VBA "Replace Component"

Anonymous
Not applicable

(Bear with me again as I just started learning VBA on Friday.)

 

I'm writing a program that allows a user to browse a file path, rename the project and it's children files, browse an open file dialog to select assemblies, and then open the assemblies. Obviously this causes a resolve link issue. So what I need to tell VBA is to talk to Inventor and tell it to use the replace component function. I can work out the details of it about how to find it and all, but I'm not sure how to actually tell VBA to use that function...any ideas? This is the first time I'll actually be moving from my little forms and modules into Inventor itself, so I haven't a clue what to do.

 

I can provide JPEGS, codes, whatever you all need. I'm at the point right now that I'm actually opening the assembly.

0 Likes
Reply
Accepted solutions (1)
790 Views
3 Replies
Replies (3)

Anonymous
Not applicable

Does simply ReplaceComponent work? Does anyone know?

0 Likes

Anonymous
Not applicable
Accepted solution

Hi Alyssa, I'm stuckon something similar so I may not necessarily be the best one to answer, but the simple syntax for replacing a component is this:

 

 

Component.Replace("PART NUMBER THAT IS BEING REPLACED", "THE NEW PART ", False)

 

Hope that is what you were looking for. 

Anonymous
Not applicable

Do you need any help? The project I'm doing is a renamer that will then automatically go through and resolve all the links....if your project is something similar I may be able to send you some of the work I've done on it so far.

0 Likes