This content has been marked as final. Show 2 replies
I'm editing the following macro:
Instead of removing materials. I want to:
- Open a child (both SLDPRT and SLDASM).
- Save the child with a new name in a new path. The newly saved part has to replace the old one in the assembly.
- Close the child.
- Set the main assembly active.
I'm having a hard time opening the child.
I've only edited the last lines:
|' Get the component's model document|
|Set componentModel = childComponent.GetModelDoc2|
|' Get the path to the model|
|Set model = swApp.OpenDoc6(componentModel.GetPathName, componentModel.GetType, 0, "", longstatus, longwarnings)|
|' Sub-Assembly. Recurse into the sub-assembly.|
|If componentModel.GetType = swDocASSEMBLY Then RemoveMaterialFromChildren childComponent, processedComponents|