Protoolkit-Drawing dimensions turn purple after using ProAssemblyAutointerchange()
Hi all,
I have an assembly and its associated drawing with same name. I'm trying to develop a toolkit program that replaces assembly component using interchange groups. The assembly updates succesfully, but when I checks the drawing, the dimensions turn purple indicating that the references are being lost.
But when I try to perform the exact interchange group replacement manually through Creo UI, both the assembly and drawing updated correctly with no issue.
Below is the simplified version of my implementation:
- Modify skeleton and Regenerate the assembly.
- ProSolidRegenerate((ProSolid)asm_model, PRO_REGEN_NO_FLAGS).
- Replace the component using ProAssemblyAutointerchange().
- Regenerate the assembly (ProSolidRegenerate(asm_solid, PRO_REGEN_NO_FLAGS).
- Refresh the model tree ProTreetoolRefresh(asm_model).
- Set the current window to drawing window(ProWindowcurrentSet)
- Activate the drawing window(ProWindowActivate)
- Regenerate the Drawing sheet using ProDwgSheetRegenerate()
I've tried various combinations of sheet and view regeneration, window activation and refreshing API's but to no success. Is there any specific regenerate/refresh sequence required to properly update the drawing dimensions when replacing components using interchange method? Any guidance would be greatly appreciated.
Thanks!

