My aim is to update a drawing on runtime,on run time you can change
the ShapeText,ShapeType & if needed Connections also.
AFAIK this feature is often referred to as a "replace shape" feature
(try searching on these keywords)
Unfortunately, you are on you own here, there is not much help Visio
provides for that.
Though there are some 3-rd party tools that do implement this feature
If you want to incorporate this functionality into your application
and do-it-all-by-yourself,
I think here might be the way to go:
For the shape being replaced,
- save all connections, including info on target connection points.
- save z-order of the shape
- save all modified shape sheet cless.
- delete the shape
- drop brand new shape (based on new master)
- apply shape sheet cells to new shape (i.e. merge them somehow)
- apply z-order to the new shape
- apply (re-connect) all connections to the new shape..