I have 100 models I have to go through and do several things with and I'm hoping a macro can save me hours and hours of work. Basically I have to insert a new part (virtual) and select a premade template [C:\DataVault\Resource-Files\File-Templates\Epoxies\MICRO-D (FEMALE 2 ROW IBS).PRTDOT], rename it to "EPOXY", then float it and mate to the 3 assembly planes, also I need to select the configuration from the template to match the parent assembly. Not a whole lot to do but it's time consuming. I have been playing with a macro I used with the macro recorder but I am running into the issue of selecting the virtual part to manipulate it the way I need to. If someone just has the format to select the virtual part that's all I need. I am still pretty new at this so I'm kind of stumbling through this but learning too.
I attached the raw macro I created with the macro recorder as it shows the step by step process I need to do but doesn't seem to grab the part template.
If I were to do this, then I would create the required file with desired template and name and save in a common location (for e.g. design library). From there I would use macro to add it to active assembly (using AddComponent5), fixed/mate in position (just add single coincident mate between their origins) and change to virtual (using MakeVirtual2).