Hi Sunand,
I'm VERY surprised that you can attach the pattern with the code listed. As Jon points out the problem is strongly related to version. Please check the code on the released version.
The reason for using mdlElmdscr_add instead of mdlElmdscr_rewrite is that the original shape might come from a reference file (when using my original application)
I've attached to .dgn files PatternTest_SS3.dgn and PatternTest_SS4.dgn showing the results when running the test in the two versions.
(Please visit the site to view this file)(Please visit the site to view this file)