I want to preface this by saying I have no idea what I'm doing with macros/coding/api. I've only made it this far thanks to code stack and AI chats. However AI seems to be having a hard time with my last request so I'm here to see if someone who knows what they are doing would be willing to help! I have a drawing that references one part file. I have a PDM template that creates a new drawing and new part from these original files. The problem is that when creating new files using the PDM templates it does not create a link between the new part and the new drawing. The new drawing still references the original part file. (There is already an enhancement request to make the new drawing reference the new part) I have the attached macro that replaces the original part with the new part, rebuilds, then sorts the BOM the way I want it to.
What I want is to add a silent save after its done with everything else. I want it to save the drawing and the referenced part file (the part file is not open).
AI was able to add the silent save of the drawing and the part file but both the drawing and the part were immediately marked as modified after the save so when I close the document it still prompts to save the modified files. It gave me several different options, all with the same result. I'm unsure why they are being marked as modified. It's something happening in the background.
Is what I'm asking possible? Anyone willing to help out?
***** Edit ****
Got AI to finally give me what I want. I've attached a second zip file "works" for anyone curious.
***** Edit 2 *****
The file load watcher approach (in previous edit) works but it leaves a macro constantly running and if you want to run a different macro you have to stop it first. Which defeats the purpose because you then have to go start it again and I'm trying to get rid of manual processes. I've attached zip file "Works without constantly running" that uses a different approach so you can still run other macros. If anyone out there is interested. This was all done via codestack and various free AI sites (mainly Grok).
