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: 

Talking to Inventor from VBA "Replace Component"

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
alyssaweaver
678 Views, 3 Replies

Talking to Inventor from VBA "Replace Component"

(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.

Best Wishes,
Ali

|---------------------------------------------------------------------------------------------------------------------|
"It's a screwdriver, not a water pistol! What are you gonna do? Construct a cabinet at them?!"
3 REPLIES 3
Message 2 of 4
alyssaweaver
in reply to: alyssaweaver

Does simply ReplaceComponent work? Does anyone know?

Best Wishes,
Ali

|---------------------------------------------------------------------------------------------------------------------|
"It's a screwdriver, not a water pistol! What are you gonna do? Construct a cabinet at them?!"
Message 3 of 4

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. 

Message 4 of 4

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.

Best Wishes,
Ali

|---------------------------------------------------------------------------------------------------------------------|
"It's a screwdriver, not a water pistol! What are you gonna do? Construct a cabinet at them?!"

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

Post to forums  

Autodesk Design & Make Report